mirror of
https://github.com/django/django.git
synced 2025-01-26 10:09:42 +00:00
[5.0.x] Fixed JSONField's test_deep_distinct for DatabaseFeatures.nulls_order_largest=False.
Failure observed on CockroachDB. Backport of b0788a0918d0e12bc8878581d99adc3a79799f94 from main
This commit is contained in:
parent
2566f92544
commit
41d82fda2a
@ -725,7 +725,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'.
|
||||
|
Loading…
x
Reference in New Issue
Block a user