summaryrefslogtreecommitdiff
path: root/tests/migrations/test_base.py
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2019-12-20 20:49:56 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-01-20 14:39:02 +0100
commit2a2ea4ee18fdcf2c95bf6435bc63b74623e3085b (patch)
tree32c7c87c71535a8493c07e2073f1bfcd1aa7e24d /tests/migrations/test_base.py
parent26be703fe679a58bbdccf37a276a9c430ccb29f7 (diff)
Refs #31117 -- Made various tests properly handle unexpected databases aliases.
- Used selected "databases" instead of django.db.connections. - Made routers in tests.migrations skip migrations on unexpected databases. - Added DiscoverRunnerGetDatabasesTests.assertSkippedDatabases() hook which properly asserts messages about skipped databases.
Diffstat (limited to 'tests/migrations/test_base.py')
-rw-r--r--tests/migrations/test_base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/migrations/test_base.py b/tests/migrations/test_base.py
index 45c5472b0f..c4c8b1ee6c 100644
--- a/tests/migrations/test_base.py
+++ b/tests/migrations/test_base.py
@@ -24,7 +24,7 @@ class MigrationTestBase(TransactionTestCase):
def tearDown(self):
# Reset applied-migrations state.
- for db in connections:
+ for db in self.databases:
recorder = MigrationRecorder(connections[db])
recorder.migration_qs.filter(app='migrations').delete()