datatracker/ietf/settings_sqlitetest.py
Ole Laursen a92752bbcf 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
2015-02-12 15:35:05 +00:00

25 lines
615 B
Python

# Standard settings except we use SQLite and skip migrations, this is
# useful for speeding up tests that depend on the test database, try
# for instance:
#
# ./manage.py test --settings=settings_sqlitetest doc.ChangeStateTestCase
#
from settings import * # pyflakes:ignore
DATABASES = {
'default': {
'NAME': 'test.db',
'ENGINE': 'django.db.backends.sqlite3',
},
}
class DisableMigrations(object):
def __contains__(self, item):
return True
def __getitem__(self, item):
return "notmigrations"
MIGRATION_MODULES = DisableMigrations()