summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hyperkitty.spec3
-rw-r--r--hyperkitty/tests/test_views.py11
-rw-r--r--hyperkitty/tests_conf/settings_tests.py19
3 files changed, 22 insertions, 11 deletions
diff --git a/hyperkitty.spec b/hyperkitty.spec
index a7b68e5..2a2d144 100644
--- a/hyperkitty.spec
+++ b/hyperkitty.spec
@@ -99,8 +99,9 @@ touch --reference hyperkitty_standalone/settings.py \
%check
touch hyperkitty_standalone/__init__.py
+cp hyperkitty/tests_conf/settings_tests.py hyperkitty_standalone/settings_local.py
%{__python} hyperkitty_standalone/manage.py test --pythonpath=`pwd` hyperkitty
-rm -f hyperkitty_standalone/__init__.py
+rm -f hyperkitty_standalone/__init__.py hyperkitty_standalone/settings_local.py
%post
diff --git a/hyperkitty/tests/test_views.py b/hyperkitty/tests/test_views.py
index 94ec721..de4c738 100644
--- a/hyperkitty/tests/test_views.py
+++ b/hyperkitty/tests/test_views.py
@@ -35,16 +35,7 @@ from django.core.urlresolvers import reverse
from hyperkitty.models import Rating
-TEST_DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': ':memory:',
- }
-}
-
-
-@override_settings(USE_SSL=False, USE_INTERNAL_AUTH=True, DEBUG=True,
- DATABASES=TEST_DATABASES, KITTYSTORE_URL='sqlite:')
+@override_settings(USE_SSL=False, USE_INTERNAL_AUTH=True)
class AccountViewsTestCase(TestCase):
def setUp(self):
diff --git a/hyperkitty/tests_conf/settings_tests.py b/hyperkitty/tests_conf/settings_tests.py
new file mode 100644
index 0000000..6941109
--- /dev/null
+++ b/hyperkitty/tests_conf/settings_tests.py
@@ -0,0 +1,19 @@
+#
+# This module is only used to run the unit tests.
+#
+
+DEBUG = True
+TEMPLATE_DEBUG = DEBUG
+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.
+ }
+}
+KITTYSTORE_URL = 'sqlite:'
+KITTYSTORE_DEBUG=False
+USE_MOCKUPS = False