Skip to content

Commit 09c08a9

Browse files
committed
More correct implementation of the workaround to skip migrations during test, which also points at the code that makes this work at the moment.
- Legacy-Id: 9246
1 parent 3d35c4f commit 09c08a9

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

ietf/settings_sqlitetest.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ def __contains__(self, item):
1919
return True
2020

2121
def __getitem__(self, item):
22-
return None
23-
22+
# The string below is significant. It has to include the value of
23+
# django.db.migrations.loader.MIGRATIONS_MODULE_NAME. Used by django
24+
# 1.7 code in django.db.migrations.loader.MigrationLoader to
25+
# determine whether or not to run migrations for a given module
26+
from django.db.migrations.loader import MIGRATIONS_MODULE_NAME
27+
return "no " + MIGRATIONS_MODULE_NAME
28+
2429
MIGRATION_MODULES = DisableMigrations()
2530

2631
DATABASES = {

0 commit comments

Comments
 (0)