diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-09-05 21:52:36 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-09-05 22:24:46 +0200 |
| commit | c4bdf52005c1f03a47c4699b4682b98d00fd4a5b (patch) | |
| tree | 0f77fa2920ccec12d857fad65335874a1cfca5d8 /tests | |
| parent | 6d1110f2f0081a6b40dea84f01bc642d3e64acc6 (diff) | |
Moved an import to the toplevel.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_runner/tests.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_runner/tests.py b/tests/test_runner/tests.py index 3e47ee00f7..8e9991d654 100644 --- a/tests/test_runner/tests.py +++ b/tests/test_runner/tests.py @@ -240,7 +240,7 @@ class DummyBackendTest(unittest.TestCase): Test that setup_databases() doesn't fail with dummy database backend. """ tested_connections = db.ConnectionHandler({}) - with mock.patch('django.db.connections', new=tested_connections): + with mock.patch('django.test.runner.connections', new=tested_connections): runner_instance = DiscoverRunner(verbosity=0) try: old_config = runner_instance.setup_databases() @@ -263,7 +263,7 @@ class AliasedDefaultTestSetupTest(unittest.TestCase): 'NAME': 'dummy' } }) - with mock.patch('django.db.connections', new=tested_connections): + with mock.patch('django.test.runner.connections', new=tested_connections): runner_instance = DiscoverRunner(verbosity=0) try: old_config = runner_instance.setup_databases() @@ -291,7 +291,7 @@ class SetupDatabasesTests(unittest.TestCase): }) with mock.patch('django.db.backends.dummy.base.DatabaseCreation') as mocked_db_creation: - with mock.patch('django.db.connections', new=tested_connections): + with mock.patch('django.test.runner.connections', new=tested_connections): old_config = self.runner_instance.setup_databases() self.runner_instance.teardown_databases(old_config) mocked_db_creation.return_value.destroy_test_db.assert_called_once_with('dbname', 0, False) @@ -316,7 +316,7 @@ class SetupDatabasesTests(unittest.TestCase): }, }) with mock.patch('django.db.backends.dummy.base.DatabaseCreation') as mocked_db_creation: - with mock.patch('django.db.connections', new=tested_connections): + with mock.patch('django.test.runner.connections', new=tested_connections): self.runner_instance.setup_databases() mocked_db_creation.return_value.create_test_db.assert_called_once_with( 0, autoclobber=False, serialize=True, keepdb=False @@ -330,7 +330,7 @@ class SetupDatabasesTests(unittest.TestCase): }, }) with mock.patch('django.db.backends.dummy.base.DatabaseCreation') as mocked_db_creation: - with mock.patch('django.db.connections', new=tested_connections): + with mock.patch('django.test.runner.connections', new=tested_connections): self.runner_instance.setup_databases() mocked_db_creation.return_value.create_test_db.assert_called_once_with( 0, autoclobber=False, serialize=False, keepdb=False |
