Skip to content

Commit a92752b

Browse files
committed
Summary: Add a little hack to skip the new Django 1.7 migrations
when running with settings_sqlitetest to speed up the process - Legacy-Id: 9076
1 parent b334550 commit a92752b

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

ietf/settings_sqlitetest.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# Standard settings except we use SQLite, this is useful for speeding
2-
# up tests that depend on the test database, try for instance:
1+
# Standard settings except we use SQLite and skip migrations, this is
2+
# useful for speeding up tests that depend on the test database, try
3+
# for instance:
34
#
45
# ./manage.py test --settings=settings_sqlitetest doc.ChangeStateTestCase
56
#
@@ -12,3 +13,12 @@
1213
'ENGINE': 'django.db.backends.sqlite3',
1314
},
1415
}
16+
17+
class DisableMigrations(object):
18+
def __contains__(self, item):
19+
return True
20+
21+
def __getitem__(self, item):
22+
return "notmigrations"
23+
24+
MIGRATION_MODULES = DisableMigrations()

0 commit comments

Comments
 (0)