mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Add HasAnyKeys lookup for HStoreField.
This commit is contained in:
@@ -79,6 +79,12 @@ class TestQuerying(PostgresSQLTestCase):
|
||||
self.objs[1:2]
|
||||
)
|
||||
|
||||
def test_has_any_keys(self):
|
||||
self.assertSequenceEqual(
|
||||
HStoreModel.objects.filter(field__has_any_keys=['a', 'c']),
|
||||
self.objs[:3]
|
||||
)
|
||||
|
||||
def test_key_transform(self):
|
||||
self.assertSequenceEqual(
|
||||
HStoreModel.objects.filter(field__a='b'),
|
||||
|
||||
Reference in New Issue
Block a user