diff options
author | kali <kali@leap.se> | 2012-09-18 11:11:43 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-09-18 19:10:13 +0900 |
commit | 0d35f2a82bf15504ace2135af3e0c66ae1c16874 (patch) | |
tree | 1915d4f9326ec4f44c553ebad37032f57f6e636a /src/leap/base | |
parent | 430b6326d06d81c44d534543c8e9684a5c0fcb15 (diff) |
do_branding command added to setup
Diffstat (limited to 'src/leap/base')
-rw-r--r-- | src/leap/base/config.py | 2 | ||||
-rw-r--r-- | src/leap/base/constants.py | 15 | ||||
-rw-r--r-- | src/leap/base/tests/test_config.py | 2 |
3 files changed, 11 insertions, 8 deletions
diff --git a/src/leap/base/config.py b/src/leap/base/config.py index 5a52637c..e896ffd2 100644 --- a/src/leap/base/config.py +++ b/src/leap/base/config.py @@ -239,7 +239,7 @@ def get_config_file(filename, folder=None): def get_default_provider_path(): default_subpath = os.path.join("providers", - constants.DEFAULT_TEST_PROVIDER) + constants.DEFAULT_PROVIDER) default_provider_path = get_config_file( '', folder=default_subpath) diff --git a/src/leap/base/constants.py b/src/leap/base/constants.py index 6266c693..f3e24715 100644 --- a/src/leap/base/constants.py +++ b/src/leap/base/constants.py @@ -1,23 +1,26 @@ """constants to be used in base module""" -APP_NAME = "leap" +from leap import __branding +APP_NAME = __branding.get("short_name", "leap") # default provider placeholder # using `example.org` we make sure that this # is not going to be resolved during the tests phases # (we expect testers to add it to their /etc/hosts -DEFAULT_TEST_PROVIDER = "testprovider.example.org" +DEFAULT_PROVIDER = __branding.get( + "provider_domain", + "testprovider.example.org") -DEFINITION_EXPECTED_PATH = "provider-definition.json" +DEFINITION_EXPECTED_PATH = "definition.json" DEFAULT_PROVIDER_DEFINITION = { - u'api_uri': u'https://api.testprovider.example.org/', + u'api_uri': u'https://api.%s/' % DEFAULT_PROVIDER, u'api_version': u'0.1.0', u'ca_cert': u'8aab80ae4326fd30721689db813733783fe0bd7e', - u'ca_cert_uri': u'https://testprovider.example.org/cacert.pem', + u'ca_cert_uri': u'https://%s/cacert.pem' % DEFAULT_PROVIDER, u'description': {u'en': u'This is a test provider'}, u'display_name': {u'en': u'Test Provider'}, - u'domain': u'testprovider.example.org', + u'domain': u'%s' % DEFAULT_PROVIDER, u'enrollment_policy': u'open', u'public_key': u'cb7dbd679f911e85bc2e51bd44afd7308ee19c21', u'serial': 1, diff --git a/src/leap/base/tests/test_config.py b/src/leap/base/tests/test_config.py index 40461b99..74b06119 100644 --- a/src/leap/base/tests/test_config.py +++ b/src/leap/base/tests/test_config.py @@ -218,7 +218,7 @@ class ConfigHelperFunctions(BaseLeapTest): config.get_default_provider_path(), os.path.expanduser( '~/.config/leap/providers/%s/' % - constants.DEFAULT_TEST_PROVIDER) + constants.DEFAULT_PROVIDER) ) # validate ip |