mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Refs #28478 -- Deprecated TestCase's allow_database_queries and multi_db in favor of databases.
This commit is contained in:
parent
647be06538
commit
8c775391b7
27 changed files with 391 additions and 109 deletions
|
@ -18,7 +18,7 @@ class MigrationTestBase(TransactionTestCase):
|
|||
"""
|
||||
|
||||
available_apps = ["migrations"]
|
||||
multi_db = True
|
||||
databases = {'default', 'other'}
|
||||
|
||||
def tearDown(self):
|
||||
# Reset applied-migrations state.
|
||||
|
|
|
@ -25,7 +25,7 @@ class MigrateTests(MigrationTestBase):
|
|||
"""
|
||||
Tests running the migrate command.
|
||||
"""
|
||||
multi_db = True
|
||||
databases = {'default', 'other'}
|
||||
|
||||
@override_settings(MIGRATION_MODULES={"migrations": "migrations.test_migrations"})
|
||||
def test_migrate(self):
|
||||
|
|
|
@ -16,7 +16,7 @@ class RecorderTests(TestCase):
|
|||
"""
|
||||
Tests recording migrations as applied or not.
|
||||
"""
|
||||
multi_db = True
|
||||
databases = {'default', 'other'}
|
||||
|
||||
def test_apply(self):
|
||||
"""
|
||||
|
|
|
@ -38,7 +38,7 @@ class MigrateWhenFooRouter:
|
|||
|
||||
|
||||
class MultiDBOperationTests(OperationTestBase):
|
||||
multi_db = True
|
||||
databases = {'default', 'other'}
|
||||
|
||||
def _test_create_model(self, app_label, should_run):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue