mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #27100 -- Included already applied migration changes in the pre-migrate state.
Refs #24100. Thanks Tim for the review.
This commit is contained in:
parent
d1757d8df4
commit
d5c4ea5246
4 changed files with 42 additions and 30 deletions
|
@ -114,11 +114,16 @@ class MigrateSignalTests(TransactionTestCase):
|
|||
['migrate_signals.Signal']
|
||||
)
|
||||
# Migrating with an empty plan.
|
||||
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, stdout=stdout,
|
||||
)
|
||||
self.assertEqual(
|
||||
[model._meta.label for model in pre_migrate_receiver.call_args['apps'].get_models()],
|
||||
['migrate_signals.Signal']
|
||||
)
|
||||
self.assertEqual(
|
||||
[model._meta.label for model in post_migrate_receiver.call_args['apps'].get_models()],
|
||||
['migrate_signals.Signal']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue