class documentation

class TestIntersphinxCache: (source)

View In Hierarchy

Method send_returns Return a function that patches requests.adapters.HTTPAdapter.send so that it returns the provided requests.Response.
Method test_cache IntersphinxCache.get caches responses to the file system.
Method test_getRaisesException IntersphinxCache.get returns None if an exception is raised while GETing a URL and logs the exception.
@pytest.fixture
def send_returns(self, monkeypatch): (source)

Return a function that patches requests.adapters.HTTPAdapter.send so that it returns the provided requests.Response.

Parameters
monkeypatch:MonkeyPatchUndocumented
Returns
Callable[[HTTPResponse], MonkeyPatch]Undocumented
def test_cache(self, tmp_path, send_returns): (source)

IntersphinxCache.get caches responses to the file system.

Parameters
tmp_path:PathUndocumented
send_returns:Callable[[HTTPResponse], None]Undocumented
def test_getRaisesException(self, caplog): (source)

IntersphinxCache.get returns None if an exception is raised while GETing a URL and logs the exception.

Parameters
caplog:CapLogUndocumented