diff options
| author | Tim Graham <timograham@gmail.com> | 2020-10-19 13:21:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-19 19:21:31 +0200 |
| commit | afcad0f1b18ad6a2068a405b06fa7468a85fddf2 (patch) | |
| tree | dc93d534f652b6739982cab49a5c9b132106ed99 | |
| parent | 3b1746d5194778fab15c15dd14c212e0912ec8f3 (diff) | |
Relaxed some query ordering assertions in expressions tests.
It accounts for differences seen on CockroachDB.
| -rw-r--r-- | tests/expressions/tests.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py index 0da90553e4..ceeed3aeb1 100644 --- a/tests/expressions/tests.py +++ b/tests/expressions/tests.py @@ -777,26 +777,26 @@ class BasicExpressionsTests(TestCase): output_field=BooleanField(), ), ) - self.assertSequenceEqual(qs, [self.example_inc.ceo, self.foobar_ltd.ceo, self.max]) + self.assertCountEqual(qs, [self.example_inc.ceo, self.foobar_ltd.ceo, self.max]) def test_boolean_expression_combined(self): is_ceo = Company.objects.filter(ceo=OuterRef('pk')) is_poc = Company.objects.filter(point_of_contact=OuterRef('pk')) self.gmbh.point_of_contact = self.max self.gmbh.save() - self.assertSequenceEqual( + self.assertCountEqual( Employee.objects.filter(Exists(is_ceo) | Exists(is_poc)), [self.example_inc.ceo, self.foobar_ltd.ceo, self.max], ) - self.assertSequenceEqual( + self.assertCountEqual( Employee.objects.filter(Exists(is_ceo) & Exists(is_poc)), [self.max], ) - self.assertSequenceEqual( + self.assertCountEqual( Employee.objects.filter(Exists(is_ceo) & Q(salary__gte=30)), [self.max], ) - self.assertSequenceEqual( + self.assertCountEqual( Employee.objects.filter(Exists(is_poc) | Q(salary__lt=15)), [self.example_inc.ceo, self.max], ) |
