summaryrefslogtreecommitdiffstats
path: root/tests_multitenant
diff options
context:
space:
mode:
Diffstat (limited to 'tests_multitenant')
-rw-r--r--tests_multitenant/conftest.py15
-rw-r--r--tests_multitenant/test_settings.py2
2 files changed, 16 insertions, 1 deletions
diff --git a/tests_multitenant/conftest.py b/tests_multitenant/conftest.py
index 07bc0c9..c64523f 100644
--- a/tests_multitenant/conftest.py
+++ b/tests_multitenant/conftest.py
@@ -63,7 +63,20 @@ def tenants(transactional_db, request, settings):
'title': 'Other',
'secret_key': 'abcde',
'service-id': 'authentic',
- 'base_url': 'http://other.example.net'},
+ 'base_url': 'http://other.example.net'
+ },
+ {'slug': 'another',
+ 'title': 'Agent portal',
+ 'service-id': 'combo',
+ 'template_name': '...portal-agent...',
+ 'base_url': 'http://portal-agent.example.net'
+ },
+ {'slug': 'another2',
+ 'title': 'User portal',
+ 'service-id': 'combo',
+ 'template_name': '...portal-user...',
+ 'base_url': 'http://portal-user.example.net'
+ }
]}, fd)
t = Tenant(domain_url=name,
schema_name=name.replace('-', '_').replace('.', '_'))
diff --git a/tests_multitenant/test_settings.py b/tests_multitenant/test_settings.py
index 98ee238..98700f4 100644
--- a/tests_multitenant/test_settings.py
+++ b/tests_multitenant/test_settings.py
@@ -87,6 +87,8 @@ def test_tenant_template_vars(tenants, settings, client):
assert django.conf.settings.TEMPLATE_VARS['other_url'] == 'http://other.example.net'
assert django.conf.settings.TEMPLATE_VARS['site_title'] == 'Test'
assert django.conf.settings.TEMPLATE_VARS['other_variable'] == 'bar'
+ assert django.conf.settings.TEMPLATE_VARS['portal_agent_url'] == 'http://portal-agent.example.net'
+ assert django.conf.settings.TEMPLATE_VARS['portal_user_url'] == 'http://portal-user.example.net'
# check it's no longer defined after going back to the public schema
with pytest.raises(AttributeError):