set TENANT_BASE to a non exisiting path (#22892)

This commit is contained in:
Emmanuel Cazenave 2018-03-30 09:53:17 +02:00 committed by Thomas NOEL
parent 8775faab27
commit 4dda39a6bf
3 changed files with 10 additions and 1 deletions

View File

@ -8,7 +8,7 @@ import pytest
@pytest.fixture
def tenant_base(request, settings):
base = tempfile.mkdtemp('combo-tenant-base')
base = tempfile.mkdtemp('authentic-tenant-base')
settings.TENANT_BASE = base
def fin():

View File

@ -12,6 +12,11 @@ PROJECT_NAME = 'authentic2-multitenant'
with patch.object(builtin, 'file', mock_open(read_data='xxx')):
execfile(os.environ['DEBIAN_CONFIG_COMMON'])
# Avoid conflic with real tenants
# that might exist in /var/lib/authentic2_multitenant/tenants
TENANT_BASE = '/that/path/does/not/exist'
# Add the XForwardedForMiddleware
MIDDLEWARE_CLASSES = ('authentic2.middleware.XForwardedForMiddleware',) + MIDDLEWARE_CLASSES

View File

@ -14,6 +14,10 @@ PROJECT_NAME = 'passerelle'
with patch.object(builtin, 'file', mock_open(read_data='xxx')):
execfile(os.environ['DEBIAN_CONFIG_COMMON'])
# 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',