Leave the global responses configuration alone (#3529)
Instead of modifying responses._default_mock, create our own responses.RequestsMock object that we can modify as needed without interfering with other users of the responses library. Fixes #3264. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
parent
c8151e1bb4
commit
8befcb6a48
4 changed files with 8 additions and 7 deletions
|
|
@ -248,7 +248,7 @@ botocore_mock = responses.RequestsMock(
|
|||
target="botocore.vendored.requests.adapters.HTTPAdapter.send",
|
||||
)
|
||||
|
||||
responses_mock = responses._default_mock
|
||||
responses_mock = responses.RequestsMock(assert_all_requests_are_fired=False)
|
||||
# Add passthrough to allow any other requests to work
|
||||
# Since this uses .startswith, it applies to http and https requests.
|
||||
responses_mock.add_passthru("http")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue