[doc] fix requests monkeypatch example
This commit is contained in:
parent
9232b88df3
commit
7cf859085e
|
@ -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``
|
||||||
|
|
Loading…
Reference in New Issue