diff options
author | Joachim Jablon <ewjoachim@gmail.com> | 2016-11-17 16:23:17 +0100 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-11-17 10:23:17 -0500 |
commit | 721f0ca85c68929354b3ea20cdc61cb671652487 (patch) | |
tree | f8b0cbce8a1638eb2e153e7b02f8a4125c6137e0 | |
parent | 0d9ff873d9f93efbba875efbf582db88bb0e30ce (diff) | |
download | django-721f0ca85c68929354b3ea20cdc61cb671652487.tar.gz |
Simplified a test after refs #26207.
-rw-r--r-- | tests/serializers/tests.py | 4 |
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""" |