pytest_requests_futures package¶
Module contents¶
- pytest_requests_futures.future_mock()[source]¶
Build a mock of an instance of a Future.
Creates a mock object, that behaves similar to a Future instance, given an http status code, which the client desires the mock to emulate.
The mock object is similar to the output of the MockFuturesSession.get method and has the single “result” ‘method’ that returns an object with the “status_code” property.
- Parameters
status_code (int) – the http status code that the client desires the mock to return
- Returns
an instance of a Futere Mock
- Return type
FutureMock