diff options
| author | Simon Charette <charette.s@gmail.com> | 2016-01-25 14:27:35 -0500 |
|---|---|---|
| committer | Simon Charette <charette.s@gmail.com> | 2016-01-25 21:38:36 -0500 |
| commit | 4dcaa5871b70859952c6f9c437dfe1b5f10509f2 (patch) | |
| tree | b67b44293702762314d86f7d625588c69acb1ca1 /tests/migrations/test_questioner.py | |
| parent | 229488c8a1486f25b1f2b5ca422cac67708c6c9d (diff) | |
Fixed #26135 -- Adjusted the migration questioner's handling of disabled apps.
This was causing an issue when calling the `migrate` command in a test case with
the `available_apps` attribute pointing to an application with migrations
disabled using the `MIGRATION_MODULES` setting.
Thanks to Tim Graham for the review.
Refs #24919
Diffstat (limited to 'tests/migrations/test_questioner.py')
| -rw-r--r-- | tests/migrations/test_questioner.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/migrations/test_questioner.py b/tests/migrations/test_questioner.py new file mode 100644 index 0000000000..d5ba18a684 --- /dev/null +++ b/tests/migrations/test_questioner.py @@ -0,0 +1,15 @@ +from __future__ import unicode_literals + +from django.db.migrations.questioner import MigrationQuestioner +from django.test import SimpleTestCase +from django.test.utils import override_settings + + +class QuestionerTests(SimpleTestCase): + @override_settings( + INSTALLED_APPS=['migrations'], + MIGRATION_MODULES={'migrations': None}, + ) + def test_ask_initial_with_disabled_migrations(self): + questioner = MigrationQuestioner() + self.assertIs(False, questioner.ask_initial('migrations')) |
