aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/fix-testsuite.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/fix-testsuite.patch')
-rw-r--r--debian/patches/fix-testsuite.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/debian/patches/fix-testsuite.patch b/debian/patches/fix-testsuite.patch
new file mode 100644
index 0000000..11de6c2
--- /dev/null
+++ b/debian/patches/fix-testsuite.patch
@@ -0,0 +1,39 @@
+Description: Fix settings for test suite
+Author: Raphaël Hertzog <hertzog@debian.org>
+Origin: vendor
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format.
+--- python-django-tagging-0.3.1.orig/tagging/tests/settings.py
++++ python-django-tagging-0.3.1/tagging/tests/settings.py
+@@ -3,22 +3,14 @@ DIRNAME = os.path.dirname(__file__)
+
+ DEFAULT_CHARSET = 'utf-8'
+
+-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)
++DATABASES = {
++ 'default': {
++ 'ENGINE': 'django.db.backends.sqlite3',
++ 'NAME': os.path.join(DIRNAME, 'tagging_test.db'),
++ }
++}
+
++SECRET_KEY = 'liewoo1jie7TahTao3ci7xayee8gieg9ukee'
+
+ INSTALLED_APPS = (
+ 'django.contrib.contenttypes',