hobo/tests_passerelle/settings.py

32 lines
747 B
Python

import os.path
import __builtin__ as builtin
from mock import mock_open, patch
import os
# Debian defaults
DEBUG = False
PROJECT_NAME = 'passerelle'
#
# hobotization (multitenant)
#
with patch.object(builtin, 'file', mock_open(read_data='xxx')):
execfile(os.environ['DEBIAN_CONFIG_COMMON'])
BRANCH_NAME = os.environ.get("BRANCH_NAME", "").replace('/', '-')
DATABASES['default']['TEST'] = {
'NAME': DATABASES['default']['NAME'] + '-%s' % BRANCH_NAME,
}
# Avoid conflic with real tenants
# that might exist in /var/lib/passerelle/tenants
TENANT_BASE = '/that/path/does/not/exist'
# suds logs are buggy
LOGGING['loggers']['suds'] = {
'level': 'ERROR',
'handlers': ['mail_admins', 'sentry'],
'propagate': True,
}