def get_config_port():
return config.default_port
+def get_config_endpoint():
+ return config.default_endpoint
+
def get_main_aws_access_key():
return config.main_access_key
get_config_is_secure,
get_config_host,
get_config_port,
+ get_config_endpoint,
get_main_aws_access_key,
get_main_aws_secret_key,
get_main_display_name,
eq(body, 'bar')
def _get_post_url(bucket_name):
- protocol='http'
- is_secure = get_config_is_secure()
-
- if is_secure is True:
- protocol='https'
-
- host = get_config_host()
- port = get_config_port()
-
- url = '{protocol}://{host}:{port}/{bucket_name}'.format(protocol=protocol,\
- host=host, port=port, bucket_name=bucket_name)
- return url
+ endpoint = get_config_endpoint()
+ return '{endpoint}/{bucket_name}'.format(endpoint=endpoint, bucket_name=bucket_name)
@attr(resource='object')
@attr(method='post')