summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2020-05-27 09:03:53 +0200
committerGitHub <noreply@github.com>2020-05-27 09:03:53 +0200
commitf4bab0982aba90dd1d2a7f9b6141d72f76922fe5 (patch)
treeec44e6729d8ba7ec60edbd07c0e0b151943d2c49
parent587b179d4115f2e4dbc425d1ae035be9eb22197b (diff)
Refs #31614 -- Added test for ordering by OrderBy() of combined queryset with not selected columns.
-rw-r--r--tests/queries/test_qs_combinators.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/queries/test_qs_combinators.py b/tests/queries/test_qs_combinators.py
index 8e2e14403d..9c6fd474ca 100644
--- a/tests/queries/test_qs_combinators.py
+++ b/tests/queries/test_qs_combinators.py
@@ -268,6 +268,8 @@ class QuerySetSetOperationTests(TestCase):
list(qs1.union(qs2).order_by('num'))
with self.assertRaisesMessage(DatabaseError, msg):
list(qs1.union(qs2).order_by(F('num')))
+ with self.assertRaisesMessage(DatabaseError, msg):
+ list(qs1.union(qs2).order_by(F('num').desc()))
# switched order, now 'exists' again:
list(qs2.union(qs1).order_by('num'))