def setup(self): class NoopHeuristic(BaseHeuristic): warning = Mock() def update_headers(self, resp_headers, resp_status): return {} self.heuristic = NoopHeuristic() self.async_client = make_async_client(heuristic=self.heuristic)
async def async_client(self, cache): async_client = make_async_client(cache=cache) yield async_client await async_client.aclose()
def setup(self): self.async_client = make_async_client(heuristic=ExpiresAfterHeuristic( days=1))
def setup(self): self.async_client = make_async_client(heuristic=OneDayCacheHeuristic())
def setup(self): class DummyHeuristic(BaseHeuristic): def update_headers(self, resp_headers, resp_status): return {"x-dummy-header": "foobar"} self.async_client = make_async_client(heuristic=DummyHeuristic())
def setup(self): self.async_client = make_async_client( heuristic=LastModifiedHeuristic())
def setup(self): self.async_client = make_async_client()