diff options
| author | Tim Graham <timograham@gmail.com> | 2023-09-22 00:25:17 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-22 06:25:17 +0200 |
| commit | b0788a0918d0e12bc8878581d99adc3a79799f94 (patch) | |
| tree | 75289958921d849a13eb23bd9070f253dfd0cd01 /tests/model_fields | |
| parent | 779cd28acb1f7eb06f629c0ea4ded99b5ebb670a (diff) | |
Fixed JSONField's test_deep_distinct for DatabaseFeatures.nulls_order_largest=False.
Failure observed on CockroachDB.
Diffstat (limited to 'tests/model_fields')
| -rw-r--r-- | tests/model_fields/test_jsonfield.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/model_fields/test_jsonfield.py b/tests/model_fields/test_jsonfield.py index 40836aece7..1be59e17b3 100644 --- a/tests/model_fields/test_jsonfield.py +++ b/tests/model_fields/test_jsonfield.py @@ -700,7 +700,10 @@ class TestQuerying(TestCase): query = NullableJSONModel.objects.distinct("value__k__l").values_list( "value__k__l" ) - self.assertSequenceEqual(query, [("m",), (None,)]) + expected = [("m",), (None,)] + if not connection.features.nulls_order_largest: + expected.reverse() + self.assertSequenceEqual(query, expected) def test_isnull_key(self): # key__isnull=False works the same as has_key='key'. |
