mirror of https://github.com/django/django.git
Fixed #21243 -- Corrected exception message in multiple database tests.
Thanks to vajrasky for the report and patch.
This commit is contained in:
parent
7523e78463
commit
a971d19bab
|
@ -48,7 +48,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,
|
||||||
|
@ -83,7 +83,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,
|
||||||
|
|
Loading…
Reference in New Issue