Skip to content

Commit

Permalink
Allow running with postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
coleifer committed Feb 23, 2011
1 parent 7ef7b02 commit b8cb7d9
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions runtests.py
Expand Up @@ -4,11 +4,18 @@

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 = 'postgresql_psycopg2',
# DATABASE_NAME = 'test_main',
DATABASE_ENGINE = db_engine,
DATABASE_NAME = db_name,
INSTALLED_APPS = [
'django.contrib.contenttypes',
'generic_aggregation.generic_aggregation_tests',
Expand Down

0 comments on commit b8cb7d9

Please sign in to comment.