diff options
| author | Hasan Ramezani <hasan.r67@gmail.com> | 2020-09-17 08:26:06 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-17 08:26:06 +0200 |
| commit | a046bcadbee2dc0e6c889f82c08b5a21a32359ad (patch) | |
| tree | e1c15de11f45244802e039e486b39ebf98320c9a /tests | |
| parent | 981a072dd4dec586f8fc606712ed9a2ef116eeee (diff) | |
Fixed #31916 -- Fixed combined queryset crash when combining with ordered combined querysets.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/queries/test_qs_combinators.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/queries/test_qs_combinators.py b/tests/queries/test_qs_combinators.py index d12b27522c..d6a5667fe7 100644 --- a/tests/queries/test_qs_combinators.py +++ b/tests/queries/test_qs_combinators.py @@ -237,12 +237,15 @@ class QuerySetSetOperationTests(TestCase): def test_unsupported_ordering_slicing_raises_db_error(self): qs1 = Number.objects.all() qs2 = Number.objects.all() + qs3 = Number.objects.all() msg = 'LIMIT/OFFSET not allowed in subqueries of compound statements' with self.assertRaisesMessage(DatabaseError, msg): list(qs1.union(qs2[:10])) msg = 'ORDER BY not allowed in subqueries of compound statements' with self.assertRaisesMessage(DatabaseError, msg): list(qs1.order_by('id').union(qs2)) + with self.assertRaisesMessage(DatabaseError, msg): + list(qs1.union(qs2).order_by('id').union(qs3)) @skipIfDBFeature('supports_select_intersection') def test_unsupported_intersection_raises_db_error(self): |
