From 3c8fe5dddf34533a419d2deed5208a28de32cb4a Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Wed, 13 May 2015 09:52:19 -0400 Subject: Fixed #24751 -- Fixed HStoreField isnull lookup. --- tests/postgres_tests/test_hstore.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/postgres_tests/test_hstore.py') diff --git a/tests/postgres_tests/test_hstore.py b/tests/postgres_tests/test_hstore.py index ed88e2fab5..e63eda46b9 100644 --- a/tests/postgres_tests/test_hstore.py +++ b/tests/postgres_tests/test_hstore.py @@ -114,6 +114,17 @@ class TestQuerying(PostgresSQLTestCase): self.objs[:3] ) + def test_key_isnull(self): + obj = HStoreModel.objects.create(field={'a': None}) + self.assertSequenceEqual( + HStoreModel.objects.filter(field__a__isnull=True), + self.objs[2:5] + [obj] + ) + self.assertSequenceEqual( + HStoreModel.objects.filter(field__a__isnull=False), + self.objs[:2] + ) + class TestSerialization(PostgresSQLTestCase): test_data = '[{"fields": {"field": "{\\"a\\": \\"b\\"}"}, "model": "postgres_tests.hstoremodel", "pk": null}]' -- cgit v1.2.1