forked from okfde/froide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename test_settings.py to settings_test.py
There can be a problem with test discovery otherwise
- Loading branch information
Showing
3 changed files
with
106 additions
and
387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# -*- coding: utf-8 -*- | ||
# Django settings for froide project. | ||
|
||
from .settings import * # noqa | ||
|
||
DEBUG = False | ||
|
||
TEMPLATE_DEBUG = False | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. | ||
'NAME': 'test.db', # Or path to database file if using sqlite3. | ||
'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. | ||
} | ||
} | ||
|
||
# A sample logging configuration. The only tangible logging | ||
# performed by this configuration is to send an email to | ||
# the site admins on every HTTP 500 error. | ||
# See http://docs.djangoproject.com/en/dev/topics/logging for | ||
# more details on how to customize your logging configuration. | ||
LOGGING = { | ||
'version': 1, | ||
'disable_existing_loggers': False, | ||
'handlers': { | ||
'mail_admins': { | ||
'level': 'ERROR', | ||
'class': 'django.utils.log.AdminEmailHandler' | ||
}, | ||
'sentry.errors': { | ||
'level': 'DEBUG', | ||
'class': 'django.utils.log.AdminEmailHandler' | ||
}, | ||
'console': { | ||
'level': 'DEBUG', | ||
'class': 'logging.StreamHandler', | ||
} | ||
}, | ||
'loggers': { | ||
'froide': { | ||
'handlers': ['console'], | ||
'propagate': True, | ||
'level': 'DEBUG', | ||
}, | ||
'sentry.errors': { | ||
'level': 'DEBUG', | ||
'handlers': ['console'], | ||
'propagate': True | ||
}, | ||
'django.request': { | ||
'handlers': ['mail_admins'], | ||
'level': 'ERROR', | ||
'propagate': True, | ||
}, | ||
} | ||
} | ||
|
||
MESSAGE_STORAGE = 'django.contrib.messages.storage.cookie.CookieStorage' | ||
|
||
CACHES = { | ||
'default': { | ||
# 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', | ||
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', | ||
} | ||
} | ||
|
||
TEST_RUNNER = 'discover_runner.DiscoverRunner' | ||
|
||
# 'chrome' or 'firefox' or 'phantomjs' | ||
TEST_SELENIUM_DRIVER = 'phantomjs' | ||
|
||
# south settings | ||
|
||
SOUTH_TESTS_MIGRATE = False | ||
|
||
USE_X_ACCEL_REDIRECT = True | ||
|
||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' | ||
|
||
DEFAULT_FROM_EMAIL = '[email protected]' | ||
|
||
# Default test domain | ||
FOI_EMAIL_DOMAIN = 'fragdenstaat.de' | ||
|
||
HAYSTACK_CONNECTIONS = { | ||
'default': { | ||
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine', | ||
'URL': 'http://127.0.0.1:9200/', | ||
'INDEX_NAME': 'froide', | ||
}, | ||
} | ||
|
||
HAYSTACK_SIGNAL_PROCESSOR = 'celery_haystack.signals.CelerySignalProcessor' | ||
|
||
CELERY_HAYSTACK_MODELS = ('foirequest.FoiRequest', 'publicbody.PublicBody') | ||
|
||
CELERY_RESULT_BACKEND = "database" | ||
CELERY_RESULT_DBURI = "sqlite:///dev.db" | ||
|
||
CELERYBEAT_SCHEDULER = "djcelery.schedulers.DatabaseScheduler" | ||
CELERY_ALWAYS_EAGER = True |
Oops, something went wrong.