poppy/tests/api/utils/config.py
Malini Kamalambal 896eab13c8 Add API Test Structure
This patch adds the initial directory structure and helpers needed
for API tests.
2014-07-14 13:34:36 -04:00

45 lines
933 B
Python

from cafe.engine.models.data_interfaces import ConfigSectionInterface
class cdnConfig(ConfigSectionInterface):
"""
Defines the config values for cdn
"""
SECTION_NAME = 'cdn'
@property
def base_url(self):
"""
CDN endpoint
"""
return self.get('base_url')
class authConfig(ConfigSectionInterface):
"""
Defines the auth config values
"""
SECTION_NAME = 'auth'
@property
def base_url(self):
"""
Auth endpoint
"""
return self.get('base_url')
@property
def user_name(self):
"""The name of the user, if applicable"""
return self.get("user_name")
@property
def api_key(self):
"""The user's api key, if applicable"""
return self.get_raw("api_key")
@property
def tenant_id(self):
"""The user's tenant_id, if applicable"""
return self.get("tenant_id")