From 2b6c9226593104583fda8e17654a7d6de6534e41 Mon Sep 17 00:00:00 2001 From: Mjumbe Wawatu Poe Date: Thu, 15 Mar 2012 18:28:37 -0400 Subject: Add test settings to work in Django 1.4 --- src/shorturls/testsettings.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/shorturls/testsettings.py b/src/shorturls/testsettings.py index 2098abf..408ea8b 100644 --- a/src/shorturls/testsettings.py +++ b/src/shorturls/testsettings.py @@ -1,8 +1,18 @@ import os DEBUG = TEMPLATE_DEBUG = True + +# For Pre-Django 1.3 DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = '/tmp/shorturls.db' + +# For Django 1.3 and beyond +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3' + } +} + INSTALLED_APPS = ['shorturls'] ROOT_URLCONF = ['shorturls.urls'] -TEMPLATE_DIRS = os.path.join(os.path.dirname(__file__), 'tests', 'templates') \ No newline at end of file +TEMPLATE_DIRS = os.path.join(os.path.dirname(__file__), 'tests', 'templates') -- cgit v1.2.3