diff options
| author | Marko Tibold | 2012-11-26 23:39:49 +0100 |
|---|---|---|
| committer | Marko Tibold | 2012-11-26 23:39:49 +0100 |
| commit | e7666014a85d65e204b40e1f54911e654f974932 (patch) | |
| tree | fab7e53a52944056369c06d6caeac86b4fc71981 /rest_framework/tests/serializer.py | |
| parent | 3f47f6cea9d178a57855e3b90208601b7e28a80f (diff) | |
| download | django-rest-framework-e7666014a85d65e204b40e1f54911e654f974932.tar.bz2 | |
Added an assertion to the tests that checks the '.errors' value for the unique-test
Diffstat (limited to 'rest_framework/tests/serializer.py')
| -rw-r--r-- | rest_framework/tests/serializer.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rest_framework/tests/serializer.py b/rest_framework/tests/serializer.py index 0baf0e89..bdf72a91 100644 --- a/rest_framework/tests/serializer.py +++ b/rest_framework/tests/serializer.py @@ -291,6 +291,7 @@ class ValidationTests(TestCase): serializer.save() second_serializer = AlbumsSerializer(data={'title': 'a'}) self.assertFalse(second_serializer.is_valid()) + self.assertEqual(second_serializer.errors, {'title': [u'Album with this Title already exists.']}) class RegexValidationTest(TestCase): |
