summaryrefslogtreecommitdiff
path: root/tests/postgres_tests/test_hstore.py
diff options
context:
space:
mode:
authorAndriy Sokolovskiy <me@asokolovskiy.com>2015-06-04 16:15:25 +0100
committerTim Graham <timograham@gmail.com>2015-06-06 09:04:53 -0400
commit2a7c59cd885b4c9f0584015c34c17c9ebca6d417 (patch)
treeec951ac7fc2af0a4af7699cc711746f23bb1f76a /tests/postgres_tests/test_hstore.py
parent08232ef84d4959826ad5136f183c9fc5bedf0599 (diff)
Added missing tests for transforms usage with subquery for PostgreSQL fields
Diffstat (limited to 'tests/postgres_tests/test_hstore.py')
-rw-r--r--tests/postgres_tests/test_hstore.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/postgres_tests/test_hstore.py b/tests/postgres_tests/test_hstore.py
index 398f444167..34229bb15c 100644
--- a/tests/postgres_tests/test_hstore.py
+++ b/tests/postgres_tests/test_hstore.py
@@ -132,6 +132,12 @@ class TestQuerying(PostgreSQLTestCase):
self.objs[:2]
)
+ def test_usage_in_subquery(self):
+ self.assertSequenceEqual(
+ HStoreModel.objects.filter(id__in=HStoreModel.objects.filter(field__a='b')),
+ self.objs[:2]
+ )
+
class TestSerialization(PostgreSQLTestCase):
test_data = '[{"fields": {"field": "{\\"a\\": \\"b\\"}"}, "model": "postgres_tests.hstoremodel", "pk": null}]'