MCPcopy Index your code
hub / github.com/aws/aws-cli / patch_make_request

Method patch_make_request

awscli/testutils.py:461–477  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

459 self.last_params = params['body']
460
461 def patch_make_request(self):
462 # If you do not stop a previously started patch,
463 # it can never be stopped if you call start() again on the same
464 # patch again...
465 # So stop the current patch before calling start() on it again.
466 if self.make_request_is_patched:
467 self.make_request_patch.stop()
468 self.make_request_is_patched = False
469 make_request_patch = self.make_request_patch.start()
470 if self.parsed_responses is not None:
471 make_request_patch.side_effect = self._request_patch_side_effect
472 else:
473 make_request_patch.return_value = (
474 self.http_response,
475 self.parsed_response,
476 )
477 self.make_request_is_patched = True
478
479 def _request_patch_side_effect(self, *args, **kwargs):
480 http_response = self.http_response

Callers 1

run_cmdMethod · 0.95

Calls 2

stopMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected