Simplified a test after refs #26207.

This commit is contained in:
Joachim Jablon 2016-11-17 16:23:17 +01:00 committed by Tim Graham
parent 0d9ff873d9
commit 721f0ca85c
1 changed files with 1 additions and 3 deletions

View File

@ -276,9 +276,7 @@ class SerializersTestBase(object):
author = Author.objects.defer('name').get(pk=author.pk)
serial_str = serializers.serialize(self.serializer_name, [author])
deserial_objs = list(serializers.deserialize(self.serializer_name, serial_str))
# Check the class instead of using isinstance() because model instances
# with deferred fields (e.g. Author_Deferred_name) will pass isinstance.
self.assertEqual(deserial_objs[0].object.__class__, Author)
self.assertIsInstance(deserial_objs[0].object, Author)
def test_custom_field_serialization(self):
"""Custom fields serialize and deserialize intact"""