1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed JSONField's test_deep_distinct for DatabaseFeatures.nulls_order_largest=False.

Failure observed on CockroachDB.
This commit is contained in:
Tim Graham
2023-09-22 00:25:17 -04:00
committed by GitHub
parent 779cd28acb
commit b0788a0918

View File

@@ -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'.