diff options
author | Simon Charette <charette.s@gmail.com> | 2016-08-20 16:34:06 -0400 |
---|---|---|
committer | Simon Charette <charette.s@gmail.com> | 2016-08-24 01:17:18 -0400 |
commit | d1757d8df486b689172d2584ded52fad916bcc33 (patch) | |
tree | 980ca1d049ea7743a95a81460181d81015160e50 /tests/migrate_signals | |
parent | ad25fe73506d80ffcaac135ad0a8d09552b70d70 (diff) | |
download | django-d1757d8df486b689172d2584ded52fad916bcc33.tar.gz |
Fixed #27044 -- Included already applied migration changes in the post-migrate state when the execution plan is empty.
Refs #24100.
Thanks tkhyn for the report and Tim for the review.
Diffstat (limited to 'tests/migrate_signals')
-rw-r--r-- | tests/migrate_signals/tests.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/migrate_signals/tests.py b/tests/migrate_signals/tests.py index d422ab84b4..bb3ea0ccc9 100644 --- a/tests/migrate_signals/tests.py +++ b/tests/migrate_signals/tests.py @@ -113,3 +113,13 @@ class MigrateSignalTests(TransactionTestCase): [model._meta.label for model in post_migrate_receiver.call_args['apps'].get_models()], ['migrate_signals.Signal'] ) + # Migrating with an empty plan. + 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 post_migrate_receiver.call_args['apps'].get_models()], + ['migrate_signals.Signal'] + ) |