You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Furthermore, it appears that when the requests_mock.Mocker decorator is applied after any unittest.mock.patch decorators, the preceding patch decorators are disabled:
The text was updated successfully, but these errors were encountered:
dhausauer-flx
changed the title
requests_mock.Mocker decorator does not work on async tests and also breaks previous patch decorators requests_mock.Mocker decorator does not work on async tests and also breaks subsequent (higher) patch decorators
Jul 13, 2023
It appears that applying a
requests_mock.Mocker
decorator on anasync
test function of aunittest.IsolatedAsyncioTestCase
does not work:Furthermore, it appears that when the
requests_mock.Mocker
decorator is applied after anyunittest.mock.patch
decorators, the precedingpatch
decorators are disabled:This does not occur if the
requests_mock.Mocker
decorator is placed above theunittest.mock.patch
decorators:Tested with
requests-mock
version1.11.0
on Python 3.7.9.Full test file is below:
The text was updated successfully, but these errors were encountered: