From f6b0c46097f3db29e7182e7744d8e40d9632be81 Mon Sep 17 00:00:00 2001 From: Emmanuel Cazenave Date: Fri, 30 Mar 2018 09:53:17 +0200 Subject: [PATCH] set TENANT_BASE to a non exisiting path (#22892) --- tests_authentic/conftest.py | 2 +- tests_authentic/settings.py | 5 +++++ tests_passerelle/settings.py | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests_authentic/conftest.py b/tests_authentic/conftest.py index 2f82b9b..89e94d5 100644 --- a/tests_authentic/conftest.py +++ b/tests_authentic/conftest.py @@ -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(): diff --git a/tests_authentic/settings.py b/tests_authentic/settings.py index 27d7d42..b3126ea 100644 --- a/tests_authentic/settings.py +++ b/tests_authentic/settings.py @@ -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 diff --git a/tests_passerelle/settings.py b/tests_passerelle/settings.py index 17d1bb2..a688f9b 100644 --- a/tests_passerelle/settings.py +++ b/tests_passerelle/settings.py @@ -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', -- 2.16.2