[1.6.x] Fixed #21243 -- Corrected exception message in multiple database tests.

Thanks to vajrasky for the report and patch.

Backport of a971d19 from trunk.
This commit is contained in:
Russell Keith-Magee 2013-10-09 09:06:23 +08:00
parent af46932b57
commit 1bf95803f3
1 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ class QueryTestCase(TestCase):
Book.objects.get(title="Pro Django") Book.objects.get(title="Pro Django")
Book.objects.using('default').get(title="Pro Django") Book.objects.using('default').get(title="Pro Django")
except Book.DoesNotExist: except Book.DoesNotExist:
self.fail('"Dive Into Python" should exist on default database') self.fail('"Pro Django" should exist on default database')
self.assertRaises(Book.DoesNotExist, self.assertRaises(Book.DoesNotExist,
Book.objects.using('other').get, Book.objects.using('other').get,
@ -84,7 +84,7 @@ class QueryTestCase(TestCase):
try: try:
Book.objects.using('other').get(title="Pro Django") Book.objects.using('other').get(title="Pro Django")
except Book.DoesNotExist: except Book.DoesNotExist:
self.fail('"Dive Into Python" should exist on other database') self.fail('"Pro Django" should exist on other database')
self.assertRaises(Book.DoesNotExist, self.assertRaises(Book.DoesNotExist,
Book.objects.get, Book.objects.get,