mirror of
https://github.com/django/django.git
synced 2025-09-27 12:39:17 +00:00
Refs #31829 -- Added DatabaseFeatures.json_key_contains_list_matching_requires_list.
CockroachDB's behavior matches PostgreSQL.
This commit is contained in:
parent
eb215da363
commit
184a6eebb0
3 changed files with 7 additions and 2 deletions
|
@ -714,8 +714,9 @@ class TestQuerying(TestCase):
|
|||
)),
|
||||
),
|
||||
]
|
||||
# PostgreSQL requires a layer of nesting.
|
||||
if connection.vendor != 'postgresql':
|
||||
# For databases where {'f': 'g'} (without surrounding []) matches
|
||||
# [{'f': 'g'}].
|
||||
if not connection.features.json_key_contains_list_matching_requires_list:
|
||||
tests.append(('value__d__contains', {'f': 'g'}))
|
||||
for lookup, value in tests:
|
||||
with self.subTest(lookup=lookup, value=value):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue