Commit e7666014 by Marko Tibold

Added an assertion to the tests that checks the '.errors' value for the unique-test

parent 3f47f6ce
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment