diff options
Diffstat (limited to 'tests/postgres_tests')
| -rw-r--r-- | tests/postgres_tests/test_hstore.py | 11 |
1 files changed, 11 insertions, 0 deletions
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}]' |
