mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
Fixed #29827 -- Fixed reuse of test databases with --keepdb on MySQL.
Regression in e1253bc26f
.
This commit is contained in:
parent
76b3367035
commit
9a88c6dd6a
3 changed files with 16 additions and 11 deletions
|
@ -43,3 +43,10 @@ class DatabaseCreationTests(SimpleTestCase):
|
|||
with self.patch_test_db_creation(self._execute_raise_access_denied):
|
||||
with self.assertRaises(SystemExit):
|
||||
creation._create_test_db(verbosity=0, autoclobber=False, keepdb=False)
|
||||
|
||||
def test_clone_test_db_database_exists(self):
|
||||
creation = DatabaseCreation(connection)
|
||||
with self.patch_test_db_creation(self._execute_raise_database_exists):
|
||||
with mock.patch.object(DatabaseCreation, '_clone_db') as _clone_db:
|
||||
creation._clone_test_db('suffix', verbosity=0, keepdb=True)
|
||||
_clone_db.assert_not_called()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue