summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-08-14 13:47:43 -0400
committerTim Graham <timograham@gmail.com>2015-08-14 13:52:33 -0400
commit632a917c11ed9aba384a64cb7c74c9af3f8adfc0 (patch)
treede0efd65976ef585b2467ef61d4f58485084f4aa
parentd2dfe3ae81b7a0ea4db0d177d3c316c7c99a4a4b (diff)
[1.8.x] Refs #23843 -- Updated Oracle annotations workaround to reflect latest status.
Backport of f9636fdf922fe49ff82d02b17d6b34469fcf1fda from master
-rw-r--r--tests/annotations/tests.py23
1 files changed, 8 insertions, 15 deletions
diff --git a/tests/annotations/tests.py b/tests/annotations/tests.py
index c08dd84d57..ce9ffe6992 100644
--- a/tests/annotations/tests.py
+++ b/tests/annotations/tests.py
@@ -16,23 +16,16 @@ from .models import (
)
-def cxOracle_513_py3_bug(func):
+def cxOracle_py3_bug(func):
"""
- cx_Oracle versions up to and including 5.1.3 have a bug with respect to
- string handling under Python3 (essentially, they treat Python3 strings
- as Python2 strings rather than unicode). This makes some tests here
- fail under Python 3 -- so we mark them as expected failures.
-
- See https://code.djangoproject.com/ticket/23843, in particular comment 6,
- which points to https://bitbucket.org/anthony_tuininga/cx_oracle/issue/6/
+ 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
-
- if connection.vendor == 'oracle' and six.PY3 and connection.Database.version <= '5.1.3':
- return expectedFailure(func)
- else:
- return func
+ return expectedFailure(func) if connection.vendor == 'oracle' and six.PY3 else func
class NonAggregateAnnotationTestCase(TestCase):
@@ -307,7 +300,7 @@ 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_513_py3_bug
+ @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()
@@ -333,7 +326,7 @@ class NonAggregateAnnotationTestCase(TestCase):
lambda c: (c.name, c.tagline)
)
- @cxOracle_513_py3_bug
+ @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()