Skip to content

Commit

Permalink
set MIGRATE setting properly when disabling migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
tuky committed Jan 15, 2024
1 parent 6cf63b6 commit 8db3256
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pytest_django/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ def __getitem__(self, item: str) -> None:
return None

settings.MIGRATION_MODULES = DisableMigrations()
# MIGRATE setting added in Django 3.1
# https://docs.djangoproject.com/en/dev/ref/settings/#std-setting-TEST_MIGRATE
settings.MIGRATE = False

class MigrateSilentCommand(migrate.Command):
def handle(self, *args, **kwargs):
Expand Down

0 comments on commit 8db3256

Please sign in to comment.