Ticket #21243: fix_exception_message_on_test_default_creation_and_test_other_creation.diff

File fix_exception_message_on_test_default_creation_and_test_other_creation.diff, 1022 bytes (added by Vajrasky Kok, 11 years ago)

Patch to fix the exception messages in the test

  • tests/multiple_database/tests.py

    diff --git a/tests/multiple_database/tests.py b/tests/multiple_database/tests.py
    index 665de2b..0550aa2 100644
    a b class QueryTestCase(TestCase):  
    4848            Book.objects.get(title="Pro Django")
    4949            Book.objects.using('default').get(title="Pro Django")
    5050        except Book.DoesNotExist:
    51             self.fail('"Dive Into Python" should exist on default database')
     51            self.fail('"Pro Django" should exist on default database')
    5252
    5353        self.assertRaises(Book.DoesNotExist,
    5454            Book.objects.using('other').get,
    class QueryTestCase(TestCase):  
    8383        try:
    8484            Book.objects.using('other').get(title="Pro Django")
    8585        except Book.DoesNotExist:
    86             self.fail('"Dive Into Python" should exist on other database')
     86            self.fail('"Pro Django" should exist on other database')
    8787
    8888        self.assertRaises(Book.DoesNotExist,
    8989            Book.objects.get,
Back to Top