diff options
| author | Ian Kelly <ian.g.kelly@gmail.com> | 2009-03-23 22:01:16 +0000 |
|---|---|---|
| committer | Ian Kelly <ian.g.kelly@gmail.com> | 2009-03-23 22:01:16 +0000 |
| commit | 64ddff1b11290397bd10a81427840e2383da149d (patch) | |
| tree | 5ef02d073770c60d90384de5053510c97bd9485e /tests | |
| parent | 9797d51efe4038637318fc7399a8501be0e563d9 (diff) | |
Fixed a false failure in the test suite when running Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10125 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/queries/models.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/regressiontests/queries/models.py b/tests/regressiontests/queries/models.py index f92018a612..06c0ebf6e9 100644 --- a/tests/regressiontests/queries/models.py +++ b/tests/regressiontests/queries/models.py @@ -831,7 +831,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. @@ -1146,6 +1146,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") + + if settings.DATABASE_ENGINE == "mysql": __test__["API_TESTS"] += """ When grouping without specifying ordering, we add an explicit "ORDER BY NULL" |
