aboutsummaryrefslogtreecommitdiff
path: root/tagging/tests/settings.py
diff options
context:
space:
mode:
authorJonas Genannt <genannt@debian.org>2015-11-15 22:25:54 +0100
committerJonas Genannt <genannt@debian.org>2015-11-15 22:25:54 +0100
commit24cd0a91184be6fa20168f9b132b1ab3f5911949 (patch)
tree9577a4d01ab2b613757875dab7b7d8b1acb64b48 /tagging/tests/settings.py
parent0b15d7564b3ceca4faebfc93401daa99102c241c (diff)
downloadpython-django-tagging-24cd0a91184be6fa20168f9b132b1ab3f5911949.tar
python-django-tagging-24cd0a91184be6fa20168f9b132b1ab3f5911949.tar.gz
reset patches that are included by the git migration
Diffstat (limited to 'tagging/tests/settings.py')
-rw-r--r--tagging/tests/settings.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/tagging/tests/settings.py b/tagging/tests/settings.py
index 1985118..74eb909 100644
--- a/tagging/tests/settings.py
+++ b/tagging/tests/settings.py
@@ -3,14 +3,22 @@ DIRNAME = os.path.dirname(__file__)
DEFAULT_CHARSET = 'utf-8'
-DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': os.path.join(DIRNAME, 'tagging_test.db'),
- }
-}
+test_engine = os.environ.get("TAGGING_TEST_ENGINE", "sqlite3")
+
+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)
-SECRET_KEY = 'liewoo1jie7TahTao3ci7xayee8gieg9ukee'
INSTALLED_APPS = (
'django.contrib.contenttypes',