summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2020-05-14 15:07:08 +0200
committerCarlton Gibson <carlton.gibson@noumenal.es>2020-05-14 15:11:18 +0200
commit92acf1022fb13a7a8b1ff7cdfe72c21050c1e4e7 (patch)
tree195de65659a75b42748fe3a580357b3be3a5fd7a /tests
parent49bbf6570d9f0880b836f741d79e4cdb6e061ea2 (diff)
downloaddjango-92acf1022fb13a7a8b1ff7cdfe72c21050c1e4e7.tar.gz
[3.0.x] Fixed #31584 -- Fixed crash when chaining values()/values_list() after Exists() annotation and aggregation on Oracle.
Oracle requires the EXISTS expression to be wrapped in a CASE WHEN in the GROUP BY clause. Regression in efa1908f662c19038a944129c81462485c4a9fe8. Backport of 3a941230c85b2702a5e1cd97e17251ce21057efa from master
Diffstat (limited to 'tests')
-rw-r--r--tests/annotations/tests.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/tests/annotations/tests.py b/tests/annotations/tests.py
index 0cdc9178b0..0064b14ed0 100644
--- a/tests/annotations/tests.py
+++ b/tests/annotations/tests.py
@@ -1,9 +1,7 @@
import datetime
from decimal import Decimal
-from unittest import skipIf
from django.core.exceptions import FieldDoesNotExist, FieldError
-from django.db import connection
from django.db.models import (
BooleanField, CharField, Count, DateTimeField, Exists, ExpressionWrapper,
F, Func, IntegerField, Max, NullBooleanField, OuterRef, Q, Subquery, Sum,
@@ -623,7 +621,6 @@ class NonAggregateAnnotationTestCase(TestCase):
).values('name')
self.assertCountEqual(publisher_books_qs, [{'name': 'Sams'}, {'name': 'Morgan Kaufmann'}])
- @skipIf(connection.vendor == 'oracle', 'See https://code.djangoproject.com/ticket/31584')
def test_annotation_exists_aggregate_values_chaining(self):
qs = Book.objects.values('publisher').annotate(
has_authors=Exists(Book.authors.through.objects.filter(book=OuterRef('pk'))),