mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
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
This commit is contained in:
15
tests/migrations/test_questioner.py
Normal file
15
tests/migrations/test_questioner.py
Normal file
@@ -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'))
|
||||
Reference in New Issue
Block a user