1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

[1.2.X] Backport of r14545 from trunk.

Fixed a multiple_database test case that was failing in Oracle due to forced table name capitalization.  The test case now matches the style used by the raw_query tests.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14546 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Ian Kelly 2010-11-12 18:51:54 +00:00
parent e074d2b9e9
commit 80946dc0fa

View File

@ -852,10 +852,10 @@ class QueryTestCase(TestCase):
"test the raw() method across databases" "test the raw() method across databases"
dive = Book.objects.using('other').create(title="Dive into Python", dive = Book.objects.using('other').create(title="Dive into Python",
published=datetime.date(2009, 5, 4)) published=datetime.date(2009, 5, 4))
val = Book.objects.db_manager("other").raw('SELECT id FROM "multiple_database_book"') val = Book.objects.db_manager("other").raw('SELECT id FROM multiple_database_book')
self.assertEqual(map(lambda o: o.pk, val), [dive.pk]) self.assertEqual(map(lambda o: o.pk, val), [dive.pk])
val = Book.objects.raw('SELECT id FROM "multiple_database_book"').using('other') val = Book.objects.raw('SELECT id FROM multiple_database_book').using('other')
self.assertEqual(map(lambda o: o.pk, val), [dive.pk]) self.assertEqual(map(lambda o: o.pk, val), [dive.pk])
def test_select_related(self): def test_select_related(self):