summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Jablon <ewjoachim@gmail.com>2016-11-17 16:23:17 +0100
committerTim Graham <timograham@gmail.com>2016-11-17 10:23:17 -0500
commit721f0ca85c68929354b3ea20cdc61cb671652487 (patch)
treef8b0cbce8a1638eb2e153e7b02f8a4125c6137e0
parent0d9ff873d9f93efbba875efbf582db88bb0e30ce (diff)
downloaddjango-721f0ca85c68929354b3ea20cdc61cb671652487.tar.gz
Simplified a test after refs #26207.
-rw-r--r--tests/serializers/tests.py4
1 files changed, 1 insertions, 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"""