From 0d5e9faf834fde78c48202870525055bb65f2d64 Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Mon, 27 Jul 2015 16:11:19 -0300 Subject: [PATCH] Set colab_settings for tests --- tests/colab_settings.py | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/run.py | 1 + 2 files changed, 62 insertions(+), 0 deletions(-) create mode 100644 tests/colab_settings.py diff --git a/tests/colab_settings.py b/tests/colab_settings.py new file mode 100644 index 0000000..c9b1b9a --- /dev/null +++ b/tests/colab_settings.py @@ -0,0 +1,61 @@ + +## Set to false in production +DEBUG = False +TEMPLATE_DEBUG = False + +## System admins +ADMINS = [['John Foo', 'john@example.com'], ['Mary Bar', 'mary@example.com']] + +MANAGERS = ADMINS + +COLAB_FROM_ADDRESS = '"Colab" ' +SERVER_EMAIL = '"Colab" ' + +EMAIL_HOST = 'localhost' +EMAIL_PORT = 25 +EMAIL_SUBJECT_PREFIX = '[colab]' + +SECRET_KEY = 'not-a-secret' + +ALLOWED_HOSTS = [ + 'localhost', +# 'example.com', +# 'example.org', +# 'example.net', +] + +### Uncomment to enable social networks fields profile +# SOCIAL_NETWORK_ENABLED = True + +## Database settings +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': 'colab.sqlite3', + } +} + +## Disable indexing +ROBOTS_NOINDEX = True + +LOGGING = { + 'version': 1, + + 'handlers': { + 'null': { + 'level': 'DEBUG', + 'class': 'logging.NullHandler', + }, + }, + + 'loggers': { + 'colab.mailman': { + 'handlers': ['null'], + 'propagate': False, + }, + 'haystack': { + 'handlers': ['null'], + 'propagate': False, + }, + }, +} diff --git a/tests/run.py b/tests/run.py index ff172cc..c73b478 100755 --- a/tests/run.py +++ b/tests/run.py @@ -4,6 +4,7 @@ import os import sys os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' +os.environ['COLAB_SETTINGS'] = 'tests/colab_settings.py' os.environ['COLAB_PLUGINS'] = 'tests/plugins.d' os.environ['COVERAGE_PROCESS_START'] = '.coveragerc' -- libgit2 0.21.2