summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Kelly <ian.g.kelly@gmail.com>2009-03-23 22:11:07 +0000
committerIan Kelly <ian.g.kelly@gmail.com>2009-03-23 22:11:07 +0000
commit7499416d0d95279e9034f4b0480287e3ce2cb4e4 (patch)
tree2041f12c1ec2397091ddadd98a264c97eaf0f8dc
parentebfe7faaa3efef952d092b332b79f182ea5f45d1 (diff)
[1.0.X] Fixed a false failure in the test suite when running Oracle. Backport of [10125] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10126 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--tests/regressiontests/queries/models.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/regressiontests/queries/models.py b/tests/regressiontests/queries/models.py
index c95171d0b1..006a0fa377 100644
--- a/tests/regressiontests/queries/models.py
+++ b/tests/regressiontests/queries/models.py
@@ -830,7 +830,7 @@ in MySQL. This exercises that case.
A values() or values_list() query across joined models must use outer joins
appropriately.
>>> Report.objects.values_list("creator__extra__info", flat=True).order_by("name")
-[u'e1', u'e2', None]
+[u'e1', u'e2', <NONE_OR_EMPTY_UNICODE>]
Similarly for select_related(), joins beyond an initial nullable join must
use outer joins so that all results are included.
@@ -1115,6 +1115,14 @@ FieldError: Infinite loop caused by ordering.
"""
+
+# In Oracle, we expect a null CharField to return u'' instead of None.
+if settings.DATABASE_ENGINE == "oracle":
+ __test__["API_TESTS"] = __test__["API_TESTS"].replace("<NONE_OR_EMPTY_UNICODE>", "u''")
+else:
+ __test__["API_TESTS"] = __test__["API_TESTS"].replace("<NONE_OR_EMPTY_UNICODE>", "None")
+
+
# Generator expressions are only in Python 2.4 and later.
if sys.version_info >= (2, 4):
__test__["API_TESTS"] += """