From e7666014a85d65e204b40e1f54911e654f974932 Mon Sep 17 00:00:00 2001 From: Marko Tibold Date: Mon, 26 Nov 2012 23:39:49 +0100 Subject: [PATCH] Added an assertion to the tests that checks the '.errors' value for the unique-test --- rest_framework/tests/serializer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rest_framework/tests/serializer.py b/rest_framework/tests/serializer.py index 0baf0e89d..bdf72a91b 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):