Skip to content
This repository has been archived by the owner on Jun 17, 2018. It is now read-only.

Commit

Permalink
modified test settings for flexibility on testing against multiple da…
Browse files Browse the repository at this point in the history
…tabases

git-svn-id: https://django-tagging.googlecode.com/svn/trunk@161 83e7428b-ec2a-0410-86f2-bf466d0e5e72
  • Loading branch information
brosner committed Aug 23, 2009
1 parent 52630d5 commit 3361bcb
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tagging/tests/settings.py
Expand Up @@ -3,22 +3,22 @@

DEFAULT_CHARSET = 'utf-8'

DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = os.path.join(DIRNAME, 'tagging_test.db')
test_engine = os.environ.get("TAGGING_TEST_ENGINE", "sqlite3")

#DATABASE_ENGINE = 'mysql'
#DATABASE_NAME = 'tagging_test'
#DATABASE_USER = 'root'
#DATABASE_PASSWORD = ''
#DATABASE_HOST = 'localhost'
#DATABASE_PORT = '3306'
DATABASE_ENGINE = test_engine
DATABASE_NAME = os.environ.get("TAGGING_DATABASE_NAME", "tagging_test")
DATABASE_USER = os.environ.get("TAGGING_DATABASE_USER", "")
DATABASE_PASSWORD = os.environ.get("TAGGING_DATABASE_PASSWORD", "")
DATABASE_HOST = os.environ.get("TAGGING_DATABASE_HOST", "localhost")

if test_engine == "sqlite":
DATABASE_NAME = os.path.join(DIRNAME, 'tagging_test.db')
DATABASE_HOST = ""
elif test_engine == "mysql":
DATABASE_PORT = os.environ.get("TAGGING_DATABASE_PORT", 3306)
elif test_engine == "postgresql_psycopg2":
DATABASE_PORT = os.environ.get("TAGGING_DATABASE_PORT", 5432)

#DATABASE_ENGINE = 'postgresql_psycopg2'
#DATABASE_NAME = 'tagging_test'
#DATABASE_USER = 'postgres'
#DATABASE_PASSWORD = ''
#DATABASE_HOST = 'localhost'
#DATABASE_PORT = '5432'

INSTALLED_APPS = (
'django.contrib.contenttypes',
Expand Down

0 comments on commit 3361bcb

Please sign in to comment.