From 721f0ca85c68929354b3ea20cdc61cb671652487 Mon Sep 17 00:00:00 2001 From: Joachim Jablon Date: Thu, 17 Nov 2016 16:23:17 +0100 Subject: [PATCH] Simplified a test after refs #26207. --- tests/serializers/tests.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/serializers/tests.py b/tests/serializers/tests.py index 7d0726ce70..f765aea815 100644 --- a/tests/serializers/tests.py +++ b/tests/serializers/tests.py @@ -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"""