[doc] fix requests monkeypatch example

This commit is contained in:
Thomas Weißschuh 2014-08-18 19:44:34 +00:00
parent 9232b88df3
commit 7cf859085e
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ requests in all your tests, you can do::
import pytest import pytest
@pytest.fixture(autouse=True) @pytest.fixture(autouse=True)
def no_requests(monkeypatch): 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 This autouse fixture will be executed for each test function and it
will delete the method ``request.session.Session.request`` will delete the method ``request.session.Session.request``