Skip to content

Commit

Permalink
test for aio-libs#5156
Browse files Browse the repository at this point in the history
  • Loading branch information
derlih committed Oct 29, 2020
1 parent 681afd6 commit 04c2f30
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,16 @@ def test_default_resolver() -> None:
# else:
# assert DefaultResolver is ThreadedResolver
assert DefaultResolver is ThreadedResolver


async def test_threaded_resolver_5156() -> None:
loop = Mock()
loop.getaddrinfo = fake_addrinfo(["127.0.0.1"])
loop.getaddrinfo.return_value = [
(2, 1, 6, "", ("151.101.188.223", 443)),
(10, 1, 6, "", (10, b"\x01\xbb\x00\x00\x00\x00*\x04NB\x00-\x00\x00")),
]
resolver = ThreadedResolver()
resolver._loop = loop

await resolver.resolve("foo")

0 comments on commit 04c2f30

Please sign in to comment.