MCPcopy Index your code
hub / github.com/JoshData/python-email-validator / TestCache

Class TestCache

tests/test_deliverability.py:70–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68@pytest.mark.network
69def test_caching_dns_resolver() -> None:
70 class TestCache:
71 def __init__(self) -> None:
72 self.cache: Dict[Any, Any] = {}
73
74 def get(self, key: Any) -> Any:
75 return self.cache.get(key)
76
77 def put(self, key: Any, value: Any) -> Any:
78 self.cache[key] = value
79
80 cache = TestCache()
81 resolver = caching_resolver(timeout=1, cache=cache)

Callers 1

Calls

no outgoing calls

Tested by 1