From a92752bbcf56559afc6d23ae066d2bffe28cb310 Mon Sep 17 00:00:00 2001 From: Ole Laursen Date: Thu, 12 Feb 2015 15:35:05 +0000 Subject: [PATCH] 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 --- ietf/settings_sqlitetest.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ietf/settings_sqlitetest.py b/ietf/settings_sqlitetest.py index 4413691d9..bf00b9f47 100644 --- a/ietf/settings_sqlitetest.py +++ b/ietf/settings_sqlitetest.py @@ -1,5 +1,6 @@ -# Standard settings except we use SQLite, this is useful for speeding -# up tests that depend on the test database, try for instance: +# 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 # @@ -12,3 +13,12 @@ DATABASES = { 'ENGINE': 'django.db.backends.sqlite3', }, } + +class DisableMigrations(object): + def __contains__(self, item): + return True + + def __getitem__(self, item): + return "notmigrations" + +MIGRATION_MODULES = DisableMigrations()