Catch RuntimeError on unpatching in case of multiple unpatching.
This commit is contained in:
parent
774de0d54d
commit
2ee484990d
1 changed files with 9 additions and 2 deletions
|
|
@ -206,8 +206,15 @@ class ResponsesMockAWS(BaseMockAWS):
|
||||||
)
|
)
|
||||||
|
|
||||||
def disable_patching(self):
|
def disable_patching(self):
|
||||||
botocore_mock.stop()
|
try:
|
||||||
responses.stop()
|
botocore_mock.stop()
|
||||||
|
except RuntimeError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
responses.stop()
|
||||||
|
except RuntimeError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
MockAWS = ResponsesMockAWS
|
MockAWS = ResponsesMockAWS
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue