summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/backends/mysql/test_creation.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/backends/mysql/test_creation.py b/tests/backends/mysql/test_creation.py
index e3a83346fe..2f6351d9bc 100644
--- a/tests/backends/mysql/test_creation.py
+++ b/tests/backends/mysql/test_creation.py
@@ -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()