From 74fe4428e51030cbed768083489f0497f4453c17 Mon Sep 17 00:00:00 2001 From: Marc Tamlyn Date: Sat, 30 May 2015 21:22:36 +0100 Subject: Add HasAnyKeys lookup for HStoreField. --- tests/postgres_tests/test_hstore.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/postgres_tests') diff --git a/tests/postgres_tests/test_hstore.py b/tests/postgres_tests/test_hstore.py index 470ede9d22..50a4702716 100644 --- a/tests/postgres_tests/test_hstore.py +++ b/tests/postgres_tests/test_hstore.py @@ -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'), -- cgit v1.3