Ejemplo n.º 1
0
 def file_cache(self):
     return DefaultAgentFileCache(
         path=Path(os.devnull),
         max_age=0,
         disabled=True,
         use_outdated=True,
         simulation=False,
     )
Ejemplo n.º 2
0
 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,
     )
Ejemplo n.º 3
0
 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,
     )