Skip to content

Commit

Permalink
Update test_connector.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamsorcerer authored Oct 22, 2022
1 parent 3daa2c4 commit 9d95e8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -2190,7 +2190,9 @@ def test_expired_ttl(self, monkeypatch: pytest.MonkeyPatch) -> None:

def test_never_expire(self) -> None:
dns_cache_table = _DNSCacheTable(ttl=None)
monkeypatch.setattr("aiohttp.connector.monotonic", lambda: 1)
dns_cache_table.add("localhost", ["127.0.0.1"])
monkeypatch.setattr("aiohttp.connector.monotonic", lambda: 10000000)
assert not dns_cache_table.expired("localhost")

def test_always_expire(self, monkeypatch: pytest.MonkeyPatch) -> None:
Expand Down

0 comments on commit 9d95e8a

Please sign in to comment.