From 3d35c4f3a30a3060a51ff41f53daaa1b9f9db9fd Mon Sep 17 00:00:00 2001
From: Henrik Levkowetz <henrik@levkowetz.com>
Date: Thu, 19 Mar 2015 13:14:41 +0000
Subject: [PATCH] Tweaked sqlitetest config to avoid a minutes-long stepping
 through migrations for each test run.  - Legacy-Id: 9245

---
 ietf/settings_sqlitetest.py | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/ietf/settings_sqlitetest.py b/ietf/settings_sqlitetest.py
index 4413691d9..666d3cd6e 100644
--- a/ietf/settings_sqlitetest.py
+++ b/ietf/settings_sqlitetest.py
@@ -6,6 +6,23 @@
 
 from settings import *                  # pyflakes:ignore
 
+# Workaround to avoid spending minutes stepping through the migrations in
+# every test run.  The result of this is to use the 'syncdb' way of creating
+# the test database instead of doing it through the migrations.  Taken from
+# https://gist.github.com/NotSqrt/5f3c76cd15e40ef62d09
+
+## To be removed after upgrade to Django 1.8 ##
+
+class DisableMigrations(object):
+ 
+    def __contains__(self, item):
+        return True
+ 
+    def __getitem__(self, item):
+        return None
+ 
+MIGRATION_MODULES = DisableMigrations()
+
 DATABASES = {
     'default': {
         'NAME': 'test.db',