diff --git a/doc/en/monkeypatch.txt b/doc/en/monkeypatch.txt index 4d56e860f..6398bc11e 100644 --- a/doc/en/monkeypatch.txt +++ b/doc/en/monkeypatch.txt @@ -48,7 +48,7 @@ requests in all your tests, you can do:: import pytest @pytest.fixture(autouse=True) def no_requests(monkeypatch): - monkeypatch.delattr("requests.session.Session.request") + monkeypatch.delattr("requests.sessions.Session.request") This autouse fixture will be executed for each test function and it will delete the method ``request.session.Session.request``