diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-04-14 12:54:27 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-04-18 07:05:52 +0200 |
| commit | 8e89dfe1c24540d33b577377af633694ff57f505 (patch) | |
| tree | 127b5b495d97a89e88e943470b8a57a2f8ce907f /tests/serializers | |
| parent | 331a460f8f2e4f447b68fba491464b68c9b21fd1 (diff) | |
| download | django-8e89dfe1c24540d33b577377af633694ff57f505.tar.gz | |
Fixed various tests on MySQL with MyISAM storage engine.
Diffstat (limited to 'tests/serializers')
| -rw-r--r-- | tests/serializers/test_natural.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/serializers/test_natural.py b/tests/serializers/test_natural.py index 6b6cfae6f3..b5b35708c6 100644 --- a/tests/serializers/test_natural.py +++ b/tests/serializers/test_natural.py @@ -78,11 +78,13 @@ def natural_key_test(self, format): # Deserialize and test. books = list(serializers.deserialize(format, string_data)) - self.assertEqual(len(books), 2) - self.assertEqual(books[0].object.title, book1["title"]) - self.assertEqual(books[0].object.pk, adrian.pk) - self.assertEqual(books[1].object.title, book2["title"]) - self.assertIsNone(books[1].object.pk) + self.assertCountEqual( + [(book.object.title, book.object.pk) for book in books], + [ + (book1["title"], adrian.pk), + (book2["title"], None), + ], + ) def natural_pk_mti_test(self, format): |
