Revert error messages.

This commit is contained in:
Xavier Ordoquy 2015-09-23 17:53:52 +02:00
parent 1f20cb7753
commit 87aff642fb
2 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ class TestSimpleBoundField:
serializer.is_valid()
assert serializer['text'].value == 'x' * 1000
assert serializer['text'].errors == ['Ensure this value has at most 100 characters (it has 1000).']
assert serializer['text'].errors == ['Ensure this field has no more than 100 characters.']
assert serializer['text'].name == 'text'
assert serializer['amount'].value is 123
assert serializer['amount'].errors is None

View File

@ -154,7 +154,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 value has at most 100 characters (it has 600).</span>'
expected_error = '<span class="help-block">Ensure this field has no more than 100 characters.</span>'
self.assertIn(expected_error, response.rendered_content.decode('utf-8'))
@ -301,7 +301,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 value has at most 100 characters (it has 600).</span>'
expected_error = '<span class="help-block">Ensure this field has no more than 100 characters.</span>'
self.assertIn(expected_error, response.rendered_content.decode('utf-8'))