Skip to content

Commit

Permalink
Add coverage for TCP/TLS async getsockname.
Browse files Browse the repository at this point in the history
  • Loading branch information
bwelling committed Jul 8, 2020
1 parent 7a5e597 commit 5250399
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ async def run():
socket.SOCK_STREAM, 0,
None,
(address, 53)) as s:
# for basic coverage
await s.getsockname()
q = dns.message.make_query(qname, dns.rdatatype.A)
return await dns.asyncquery.tcp(q, address, sock=s)
response = self.async_run(run)
Expand Down Expand Up @@ -315,6 +317,8 @@ async def run():
None,
(address, 853), None,
ssl_context, None) as s:
# for basic coverage
await s.getsockname()
q = dns.message.make_query(qname, dns.rdatatype.A)
return await dns.asyncquery.tls(q, '8.8.8.8', sock=s)
response = self.async_run(run)
Expand Down

0 comments on commit 5250399

Please sign in to comment.