def setup_stub(self): """Set up the remote API stub.""" if self.remote_api_stub_initialized: return params = get_mapper_params() if "extra_header" in params and params["extra_header"]: extra_headers = dict([params["extra_header"].split(":", 1)]) else: extra_headers = {} remote_api_put_stub.configure_remote_put(params["remote_url"], params["target_app"], extra_headers) self.remote_api_stub_initialized = True
def setup_stub(self): """Set up the remote API stub.""" if self.remote_api_stub_initialized: return params = get_mapper_params() if 'extra_header' in params and params['extra_header']: extra_headers = dict([params['extra_header'].split(':', 1)]) else: extra_headers = {} remote_api_put_stub.configure_remote_put(params['remote_url'], params['target_app'], extra_headers) self.remote_api_stub_initialized = True