summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2018-12-02 22:17:32 +0000
committerTim Graham <timograham@gmail.com>2018-12-06 15:31:33 -0500
commitf9a33e3c3f4cfbff60522cd54455e78c96a9d2a4 (patch)
treec34c82c910be73980f7ed03bdb19bd6e75bb9588 /tests
parentae180fa4b7f927a4aeae772975927c9888bb0cb0 (diff)
Fixed #29932 -- Fixed combining compound queries with sub-compound queries on SQLite and Oracle.
Diffstat (limited to 'tests')
-rw-r--r--tests/queries/test_qs_combinators.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/queries/test_qs_combinators.py b/tests/queries/test_qs_combinators.py
index f1785dd783..8a928ba91f 100644
--- a/tests/queries/test_qs_combinators.py
+++ b/tests/queries/test_qs_combinators.py
@@ -214,3 +214,9 @@ class QuerySetSetOperationTests(TestCase):
list(qs1.union(qs2).order_by('num'))
# switched order, now 'exists' again:
list(qs2.union(qs1).order_by('num'))
+
+ @skipUnlessDBFeature('supports_select_difference', 'supports_select_intersection')
+ def test_qs_with_subcompound_qs(self):
+ qs1 = Number.objects.all()
+ qs2 = Number.objects.intersection(Number.objects.filter(num__gt=1))
+ self.assertEqual(qs1.difference(qs2).count(), 2)