Author: ikelly Date: 2009-03-23 17:01:16 -0500 (Mon, 23 Mar 2009) New Revision: 10125
Modified: django/trunk/tests/regressiontests/queries/models.py Log: Fixed a false failure in the test suite when running Oracle. Modified: django/trunk/tests/regressiontests/queries/models.py =================================================================== --- django/trunk/tests/regressiontests/queries/models.py 2009-03-23 22:00:13 UTC (rev 10124) +++ django/trunk/tests/regressiontests/queries/models.py 2009-03-23 22:01:16 UTC (rev 10125) @@ -831,7 +831,7 @@ 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 @@ """ + +# 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" --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---