From 23e685bba8f61c4c1bacce4963b075be98bcc833 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Tue, 19 Mar 2013 10:27:14 -0400 Subject: [PATCH] make test database use sqlite --- app_setup/templates/local_settings.py.j2 | 9 +++++++++ lib/settings/defaults.py | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app_setup/templates/local_settings.py.j2 b/app_setup/templates/local_settings.py.j2 index e794f756b5..02c3acd7fe 100644 --- a/app_setup/templates/local_settings.py.j2 +++ b/app_setup/templates/local_settings.py.j2 @@ -19,6 +19,15 @@ DATABASES = { } } +if 'test' in sys.argv: + DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'acom.sqlite3'), + } + } + + # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. diff --git a/lib/settings/defaults.py b/lib/settings/defaults.py index 1b392558f8..e51aeee835 100644 --- a/lib/settings/defaults.py +++ b/lib/settings/defaults.py @@ -29,10 +29,10 @@ DATABASES = { } } -if 'test' in sys.argv: - DATABASES['default'] = { - 'ENGINE': 'django.db.backends.sqlite3' - } +#if 'test' in sys.argv: +# DATABASES['default'] = { +# 'ENGINE': 'django.db.backends.sqlite3' +# } # Internationalization # https://docs.djangoproject.com/en/dev/topics/i18n/