Fixed #22279 -- Prevented dummy backend going through DatabaseErrorWrapper

Thanks Daniel Hahler for the report and Tim Graham for the review.
This commit is contained in:
Claude Paroz 2014-12-27 16:19:32 +01:00
parent 1d24f073e6
commit 3c5d1edb39
2 changed files with 3 additions and 0 deletions

View file

@ -41,6 +41,8 @@ class DummyBackendTest(TestCase):
conns = ConnectionHandler(DATABASES)
self.assertEqual(conns[DEFAULT_DB_ALIAS].settings_dict['ENGINE'],
'django.db.backends.dummy')
with self.assertRaises(ImproperlyConfigured):
conns[DEFAULT_DB_ALIAS].ensure_connection()
@unittest.skipUnless(connection.vendor == 'oracle', "Test only for Oracle")