mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #34052 -- Made migrate --check don't emit signals and output when up to date.
This commit is contained in:
parent
cff1f888e9
commit
1a7b6909ac
3 changed files with 46 additions and 10 deletions
|
@ -156,3 +156,15 @@ class MigrateSignalTests(TransactionTestCase):
|
|||
],
|
||||
["migrate_signals.Signal"],
|
||||
)
|
||||
# Migrating with an empty plan and --check doesn't emit signals.
|
||||
pre_migrate_receiver = Receiver(signals.pre_migrate)
|
||||
post_migrate_receiver = Receiver(signals.post_migrate)
|
||||
management.call_command(
|
||||
"migrate",
|
||||
database=MIGRATE_DATABASE,
|
||||
verbosity=MIGRATE_VERBOSITY,
|
||||
interactive=MIGRATE_INTERACTIVE,
|
||||
check_unapplied=True,
|
||||
)
|
||||
self.assertEqual(pre_migrate_receiver.call_counter, 0)
|
||||
self.assertEqual(post_migrate_receiver.call_counter, 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue