1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Relaxed some query ordering assertions in various tests.

It accounts for differences seen on MySQL with MyISAM storage engine.
This commit is contained in:
Mariusz Felisiak
2022-04-14 12:12:13 +02:00
committed by GitHub
parent 08f30d1b6a
commit 1760ad4e8c
16 changed files with 55 additions and 49 deletions

View File

@@ -73,10 +73,10 @@ class ValuesExpressionsTests(TestCase):
def test_values_list_expression(self):
companies = Company.objects.values_list("name", F("ceo__salary"))
self.assertSequenceEqual(
self.assertCountEqual(
companies, [("Example Inc.", 10), ("Foobar Ltd.", 20), ("Test GmbH", 30)]
)
def test_values_list_expression_flat(self):
companies = Company.objects.values_list(F("ceo__salary"), flat=True)
self.assertSequenceEqual(companies, (10, 20, 30))
self.assertCountEqual(companies, (10, 20, 30))