@pytest.fixture
def request_mock(quteproc, monkeypatch, httpbin):
 fake_call = FakeRepCall()
 fake_config = FakeConfig()
 fake_node = FakeNode(fake_call)
 fake_request = FakeRequest(fake_node, fake_config, httpbin)
 assert (not hasattr(fake_request.node.rep_call, 'wasxfail'))
 monkeypatch.setattr(quteproc, 'request', fake_request)
 return fake_request

@ pytest . fixture def request_mock ( quteproc , monkeypatch , httpbin ) : fake_call = FakeRepCall ( ) fake_config = FakeConfig ( ) fake_node = FakeNode ( fake_call ) fake_request = FakeRequest ( fake_node , fake_config , httpbin ) assert ( not hasattr ( fake_request . node . rep_call , 'wasxfail' ) ) monkeypatch . setattr ( quteproc , 'request' , fake_request ) return fake_request
patch out a pytest request .