[1.8.x] Added missing tests for transforms usage with subquery for PostgreSQL fields
Backport of 2a7c59cd88
from master
This commit is contained in:
parent
b4b13759f8
commit
66496c8403
|
@ -223,6 +223,14 @@ class TestQuerying(TestCase):
|
||||||
[instance]
|
[instance]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_usage_in_subquery(self):
|
||||||
|
self.assertSequenceEqual(
|
||||||
|
NullableIntegerArrayModel.objects.filter(
|
||||||
|
id__in=NullableIntegerArrayModel.objects.filter(field__len=3)
|
||||||
|
),
|
||||||
|
[self.objs[3]]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class TestChecks(TestCase):
|
class TestChecks(TestCase):
|
||||||
|
|
||||||
|
|
|
@ -122,6 +122,12 @@ class TestQuerying(TestCase):
|
||||||
self.objs[:2]
|
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(TestCase):
|
class TestSerialization(TestCase):
|
||||||
test_data = '[{"fields": {"field": "{\\"a\\": \\"b\\"}"}, "model": "postgres_tests.hstoremodel", "pk": null}]'
|
test_data = '[{"fields": {"field": "{\\"a\\": \\"b\\"}"}, "model": "postgres_tests.hstoremodel", "pk": null}]'
|
||||||
|
|
Loading…
Reference in New Issue