Replaced assertQuerysetEqual() to assertSequenceEqual()/assertCountEqual() where appropriate.

Follow up to 3f7b327562.
This commit is contained in:
Mariusz Felisiak 2022-10-07 13:05:35 +02:00 committed by GitHub
parent 564b317fb5
commit d795259ea9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 55 additions and 114 deletions

View file

@ -68,7 +68,7 @@ class ModelInheritanceTests(TestCase):
# Even though p.supplier for a Place 'p' (a parent of a Supplier), a
# Restaurant object cannot access that reverse relation, since it's not
# part of the Place-Supplier Hierarchy.
self.assertQuerysetEqual(Place.objects.filter(supplier__name="foo"), [])
self.assertSequenceEqual(Place.objects.filter(supplier__name="foo"), [])
msg = (
"Cannot resolve keyword 'supplier' into field. Choices are: "
"address, chef, chef_id, id, italianrestaurant, lot, name, "
@ -93,7 +93,7 @@ class ModelInheritanceTests(TestCase):
getattr(post, "attached_%(class)s_set")
def test_model_with_distinct_related_query_name(self):
self.assertQuerysetEqual(
self.assertSequenceEqual(
Post.objects.filter(attached_model_inheritance_comments__is_spam=True), []
)
@ -146,7 +146,7 @@ class ModelInheritanceTests(TestCase):
self.assertEqual(s.titles.related_val, (s.id,))
# Higher level test for correct query values (title foof not
# accidentally found).
self.assertQuerysetEqual(s.titles.all(), [])
self.assertSequenceEqual(s.titles.all(), [])
def test_update_parent_filtering(self):
"""