mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user