summaryrefslogtreecommitdiffstats
path: root/hyperkitty/tests_conf/settings_tests.py
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2012-11-30 14:27:46 +0100
committerAurélien Bompard <aurelien@bompard.org>2012-11-30 14:27:46 +0100
commit716fee916da1096edb865bb43224594574d5a85b (patch)
tree96a48d79819c42843259ceaacdfd0405a6c7be4d /hyperkitty/tests_conf/settings_tests.py
parent7bdb024a3245df9c5bd7148d749197449f674442 (diff)
downloadhyperkitty-716fee916da1096edb865bb43224594574d5a85b.tar.gz
hyperkitty-716fee916da1096edb865bb43224594574d5a85b.tar.xz
hyperkitty-716fee916da1096edb865bb43224594574d5a85b.zip
Add spec file and fix unit tests
Diffstat (limited to 'hyperkitty/tests_conf/settings_tests.py')
-rw-r--r--hyperkitty/tests_conf/settings_tests.py48
1 files changed, 48 insertions, 0 deletions
diff --git a/hyperkitty/tests_conf/settings_tests.py b/hyperkitty/tests_conf/settings_tests.py
new file mode 100644
index 0000000..8b6195e
--- /dev/null
+++ b/hyperkitty/tests_conf/settings_tests.py
@@ -0,0 +1,48 @@
+#
+# WARNING: this module is only used to run the unit tests. Do not use it to run
+# HyperKitty, use the hyperkitty_standalone module instead (please see the
+# HyperKitty docs to find it).
+#
+
+import os
+BASE_DIR = os.path.dirname(os.path.abspath(__file__))
+DEBUG = True
+TEMPLATE_DEBUG = DEBUG
+
+MAILMAN_API_URL=r'http://%(username)s:%(password)s@localhost:8001/3.0/'
+MAILMAN_USER='mailmanapi'
+MAILMAN_PASS='mailmanpass'
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': ':memory:',
+ 'USER': '', # Not used with sqlite3.
+ 'PASSWORD': '', # Not used with sqlite3.
+ 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
+ 'PORT': '', # Set to empty string for default. Not used with sqlite3.
+ }
+}
+
+MIDDLEWARE_CLASSES = (
+ 'django.middleware.common.CommonMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+# 'django.middleware.csrf.CsrfViewMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+# 'django.contrib.messages.middleware.MessageMiddleware',
+ 'hyperkitty.lib.store.KittyStoreDjangoMiddleware',
+)
+
+ROOT_URLCONF = 'hyperkitty.tests_conf.urls_test'
+
+INSTALLED_APPS = (
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'hyperkitty',
+)
+
+LOGIN_URL = '/hyperkitty/accounts/login/'
+KITTYSTORE_URL = 'sqlite:'
+KITTYSTORE_DEBUG=False
+USE_MOCKUPS = False