mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 00:04:16 +03:00
Fixed new default for many
This commit is contained in:
parent
38362bb43a
commit
c9e6f31166
|
@ -661,7 +661,7 @@ class ModelValidationTests(TestCase):
|
||||||
second_serializer = AlbumsSerializer(data={'title': 'a'})
|
second_serializer = AlbumsSerializer(data={'title': 'a'})
|
||||||
self.assertFalse(second_serializer.is_valid())
|
self.assertFalse(second_serializer.is_valid())
|
||||||
self.assertEqual(second_serializer.errors, {'title': ['Album with this Title already exists.'],})
|
self.assertEqual(second_serializer.errors, {'title': ['Album with this Title already exists.'],})
|
||||||
third_serializer = AlbumsSerializer(data=[{'title': 'b', 'ref': '1'}, {'title': 'c'}])
|
third_serializer = AlbumsSerializer(data=[{'title': 'b', 'ref': '1'}, {'title': 'c'}], many=True)
|
||||||
self.assertFalse(third_serializer.is_valid())
|
self.assertFalse(third_serializer.is_valid())
|
||||||
self.assertEqual(third_serializer.errors, [{'ref': ['Album with this Ref already exists.']}, {}])
|
self.assertEqual(third_serializer.errors, [{'ref': ['Album with this Ref already exists.']}, {}])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user