mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-27 03:54:01 +03:00
Reproduces #421
This commit is contained in:
parent
c5765641a4
commit
4edc801d59
|
@ -239,6 +239,14 @@ class ValidationTests(TestCase):
|
||||||
self.assertEquals(serializer.is_valid(), True)
|
self.assertEquals(serializer.is_valid(), True)
|
||||||
self.assertEquals(serializer.errors, {})
|
self.assertEquals(serializer.errors, {})
|
||||||
|
|
||||||
|
def test_modelserializer_max_length_exceeded(self):
|
||||||
|
data = {
|
||||||
|
'title': 'x' * 201,
|
||||||
|
}
|
||||||
|
serializer = ActionItemSerializer(data=data)
|
||||||
|
self.assertEquals(serializer.is_valid(), False)
|
||||||
|
self.assertEquals(serializer.errors, {'content': [u'Ensure this value has at most 200 characters (it has 201).']})
|
||||||
|
|
||||||
|
|
||||||
class MetadataTests(TestCase):
|
class MetadataTests(TestCase):
|
||||||
def test_empty(self):
|
def test_empty(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user