summaryrefslogtreecommitdiff
path: root/tests/annotations
diff options
context:
space:
mode:
authorHasan Ramezani <hasan.r67@gmail.com>2020-12-10 18:00:57 +0100
committerGitHub <noreply@github.com>2020-12-10 18:00:57 +0100
commit275dd4ebbabbbe758c7219a3d666953d5a7b072f (patch)
treed0534f7047f9ba43525368eda2c121df54801d4c /tests/annotations
parent5ce31d6a7142ca8c76d6b52fa42b3406b9a8ff48 (diff)
downloaddjango-275dd4ebbabbbe758c7219a3d666953d5a7b072f.tar.gz
Fixed #32178 -- Allowed database backends to skip tests and mark expected failures.
Co-authored-by: Tim Graham <timograham@gmail.com>
Diffstat (limited to 'tests/annotations')
-rw-r--r--tests/annotations/tests.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/tests/annotations/tests.py b/tests/annotations/tests.py
index cc9bd82656..8337f344ed 100644
--- a/tests/annotations/tests.py
+++ b/tests/annotations/tests.py
@@ -2,7 +2,6 @@ import datetime
from decimal import Decimal
from django.core.exceptions import FieldDoesNotExist, FieldError
-from django.db import connection
from django.db.models import (
BooleanField, Case, CharField, Count, DateTimeField, DecimalField, Exists,
ExpressionWrapper, F, FloatField, Func, IntegerField, Max,
@@ -20,19 +19,6 @@ from .models import (
)
-def cxOracle_py3_bug(func):
- """
- There's a bug in Django/cx_Oracle with respect to string handling under
- Python 3 (essentially, they treat Python 3 strings as Python 2 strings
- rather than unicode). This makes some tests here fail under Python 3, so
- we mark them as expected failures until someone fixes them in #23843.
- """
- from unittest import expectedFailure
-
- from django.db import connection
- return expectedFailure(func) if connection.vendor == 'oracle' else func
-
-
class NonAggregateAnnotationTestCase(TestCase):
@classmethod
@@ -590,7 +576,6 @@ class NonAggregateAnnotationTestCase(TestCase):
e.id, e.first_name, e.manager, e.random_value, e.last_name, e.age,
e.salary, e.store.name, e.annotated_value))
- @cxOracle_py3_bug
def test_custom_functions(self):
Company(name='Apple', motto=None, ticker_name='APPL', description='Beautiful Devices').save()
Company(name='Django Software Foundation', motto=None, ticker_name=None, description=None).save()
@@ -617,7 +602,6 @@ class NonAggregateAnnotationTestCase(TestCase):
lambda c: (c.name, c.tagline)
)
- @cxOracle_py3_bug
def test_custom_functions_can_ref_other_functions(self):
Company(name='Apple', motto=None, ticker_name='APPL', description='Beautiful Devices').save()
Company(name='Django Software Foundation', motto=None, ticker_name=None, description=None).save()
@@ -770,11 +754,6 @@ class NonAggregateAnnotationTestCase(TestCase):
])
def test_annotation_aggregate_with_m2o(self):
- if connection.vendor == 'mysql' and 'ONLY_FULL_GROUP_BY' in connection.sql_mode:
- self.skipTest(
- 'GROUP BY optimization does not work properly when '
- 'ONLY_FULL_GROUP_BY mode is enabled on MySQL, see #31331.'
- )
qs = Author.objects.filter(age__lt=30).annotate(
max_pages=Case(
When(book_contact_set__isnull=True, then=Value(0)),