Permalink
Browse files

Allow running tests with postgres

  • Loading branch information...
1 parent a0c0e9a commit 02b57a47f3ee117b6b32e248c698366469be1a5b @coleifer committed Feb 23, 2011
Showing with 11 additions and 1 deletion.
  1. +11 −1 runtests.py
View
@@ -4,9 +4,19 @@
from django.conf import settings
+
+if len(sys.argv) > 1 and 'postgres' in sys.argv:
+ sys.argv.remove('postgres')
+ db_engine = 'postgresql_psycopg2'
+ db_name = 'test_main'
+else:
+ db_engine = 'sqlite3'
+ db_name = ''
+
if not settings.configured:
settings.configure(
- DATABASE_ENGINE = 'sqlite3',
+ DATABASE_ENGINE = db_engine,
+ DATABASE_NAME = db_name,
INSTALLED_APPS = [
'django.contrib.contenttypes',
'genericm2m',

0 comments on commit 02b57a4

Please sign in to comment.