Fixed tests following horizontal form changes

* error class has changed to `invalid-feedback`
This commit is contained in:
David Smith 2020-07-12 21:49:29 +01:00
parent fc7235e636
commit 39c22e057d

View File

@ -163,7 +163,7 @@ class TestRootView(TestCase):
data = {'text': 'foobar' * 100}
request = factory.post('/', data, HTTP_ACCEPT='text/html')
response = self.view(request).render()
expected_error = '<span class="help-block">Ensure this field has no more than 100 characters.</span>'
expected_error = '<span class="invalid-feedback">Ensure this field has no more than 100 characters.</span>'
assert expected_error in response.rendered_content.decode()
@ -310,7 +310,7 @@ class TestInstanceView(TestCase):
data = {'text': 'foobar' * 100}
request = factory.put('/', data, HTTP_ACCEPT='text/html')
response = self.view(request, pk=1).render()
expected_error = '<span class="help-block">Ensure this field has no more than 100 characters.</span>'
expected_error = '<span class="invalid-feedback">Ensure this field has no more than 100 characters.</span>'
assert expected_error in response.rendered_content.decode()