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:
@@ -18,7 +18,7 @@ class NullIfTests(TestCase):
|
||||
authors = Author.objects.annotate(nullif=NullIf("alias", "name")).values_list(
|
||||
"nullif"
|
||||
)
|
||||
self.assertSequenceEqual(
|
||||
self.assertCountEqual(
|
||||
authors,
|
||||
[
|
||||
("smithj",),
|
||||
@@ -34,7 +34,7 @@ class NullIfTests(TestCase):
|
||||
authors = Author.objects.annotate(
|
||||
nullif=NullIf("name", Value(None))
|
||||
).values_list("nullif")
|
||||
self.assertSequenceEqual(authors, [("John Smith",), ("Rhonda",)])
|
||||
self.assertCountEqual(authors, [("John Smith",), ("Rhonda",)])
|
||||
|
||||
def test_too_few_args(self):
|
||||
msg = "'NullIf' takes exactly 2 arguments (1 given)"
|
||||
|
||||
Reference in New Issue
Block a user