def file_cache(self): return DefaultAgentFileCache( path=Path(os.devnull), max_age=0, disabled=True, use_outdated=True, simulation=False, )
def file_cache(self) -> DefaultAgentFileCache: return DefaultAgentFileCache( HostName("hostname"), base_path=Path(os.devnull), max_age=MaxAge.none(), disabled=True, use_outdated=True, simulation=False, )
def fetcher(self, monkeypatch: MonkeyPatch, file_cache: DefaultAgentFileCache) -> TCPFetcher: # We use the TCPFetcher to test a general feature of the fetchers. return TCPFetcher( StubFileCache.from_json(file_cache.to_json()), family=socket.AF_INET, address=("1.2.3.4", 0), timeout=0.0, host_name=HostName("irrelevant_for_this_test"), encryption_settings={}, use_only_cache=False, )