Commit 83ef0de7e1c5a90d82046cddd38228e484a5fdfb

Authored by Sergio Oliveira
1 parent 97c80b74

Set colab_settings for tests

Showing 2 changed files with 62 additions and 0 deletions   Show diff stats
tests/colab_settings.py 0 → 100644
... ... @@ -0,0 +1,61 @@
  1 +
  2 +## Set to false in production
  3 +DEBUG = False
  4 +TEMPLATE_DEBUG = False
  5 +
  6 +## System admins
  7 +ADMINS = [['John Foo', 'john@example.com'], ['Mary Bar', 'mary@example.com']]
  8 +
  9 +MANAGERS = ADMINS
  10 +
  11 +COLAB_FROM_ADDRESS = '"Colab" <noreply@example.com>'
  12 +SERVER_EMAIL = '"Colab" <noreply@example.com>'
  13 +
  14 +EMAIL_HOST = 'localhost'
  15 +EMAIL_PORT = 25
  16 +EMAIL_SUBJECT_PREFIX = '[colab]'
  17 +
  18 +SECRET_KEY = 'not-a-secret'
  19 +
  20 +ALLOWED_HOSTS = [
  21 + 'localhost',
  22 +# 'example.com',
  23 +# 'example.org',
  24 +# 'example.net',
  25 +]
  26 +
  27 +### Uncomment to enable social networks fields profile
  28 +# SOCIAL_NETWORK_ENABLED = True
  29 +
  30 +## Database settings
  31 +DATABASES = {
  32 + 'default': {
  33 + 'ENGINE': 'django.db.backends.sqlite3',
  34 + 'NAME': 'colab.sqlite3',
  35 + }
  36 +}
  37 +
  38 +## Disable indexing
  39 +ROBOTS_NOINDEX = True
  40 +
  41 +LOGGING = {
  42 + 'version': 1,
  43 +
  44 + 'handlers': {
  45 + 'null': {
  46 + 'level': 'DEBUG',
  47 + 'class': 'logging.NullHandler',
  48 + },
  49 + },
  50 +
  51 + 'loggers': {
  52 + 'colab.mailman': {
  53 + 'handlers': ['null'],
  54 + 'propagate': False,
  55 + },
  56 + 'haystack': {
  57 + 'handlers': ['null'],
  58 + 'propagate': False,
  59 + },
  60 + },
  61 +}
... ...
tests/run.py
... ... @@ -4,6 +4,7 @@ import os
4 4 import sys
5 5  
6 6 os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
  7 +os.environ['COLAB_SETTINGS'] = 'tests/colab_settings.py'
7 8 os.environ['COLAB_PLUGINS'] = 'tests/plugins.d'
8 9 os.environ['COVERAGE_PROCESS_START'] = '.coveragerc'
9 10  
... ...