mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #34052 -- Made migrate --check don't emit signals and output when up to date.
This commit is contained in:
committed by
Mariusz Felisiak
parent
cff1f888e9
commit
1a7b6909ac
@@ -355,6 +355,26 @@ class MigrateTests(MigrationTestBase):
|
||||
self.assertTableNotExists("migrations_tribble")
|
||||
self.assertTableNotExists("migrations_book")
|
||||
|
||||
@override_settings(
|
||||
INSTALLED_APPS=[
|
||||
"migrations.migrations_test_apps.migrated_app",
|
||||
]
|
||||
)
|
||||
def test_migrate_check_migrated_app(self):
|
||||
out = io.StringIO()
|
||||
try:
|
||||
call_command("migrate", "migrated_app", verbosity=0)
|
||||
call_command(
|
||||
"migrate",
|
||||
"migrated_app",
|
||||
stdout=out,
|
||||
check_unapplied=True,
|
||||
)
|
||||
self.assertEqual(out.getvalue(), "")
|
||||
finally:
|
||||
# Unmigrate everything.
|
||||
call_command("migrate", "migrated_app", "zero", verbosity=0)
|
||||
|
||||
@override_settings(
|
||||
MIGRATION_MODULES={
|
||||
"migrations": "migrations.test_migrations_plan",
|
||||
|
||||
Reference in New Issue
Block a user