Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def load_response(self, service, operation):
LOG.debug('load_response: %s.%s', service, operation)
(response_file, file_format) = self.get_next_file_path(
service, operation)
LOG.debug('load_responses: %s', response_file)
with open(response_file, Format.read_mode(file_format)) as fp:
response_data = get_deserializer(file_format)(fp)
return (FakeHttpResponse(response_data['status_code']),
response_data['data'])