Skip to content

Commit

Permalink
add more wrapping accidentally omitted from the PR
Browse files Browse the repository at this point in the history
  • Loading branch information
rthalley committed Oct 12, 2024
1 parent 6c2c566 commit 0cd9d0c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,7 @@ def testTLSNameserver(self):
not (tests.util.have_ipv4() and dns.quic.have_quic),
"IPv4 not reachable or QUIC not available",
)
@tests.util.retry_on_timeout
def testQuicNameserver(self):
res = dns.resolver.Resolver(configure=False)
res.nameservers = [dns.nameserver.DoQNameserver("94.140.14.14", 784)]
Expand All @@ -788,13 +789,15 @@ def testQuicNameserver(self):
self.assertIn("94.140.15.15", seen)

@unittest.skipIf(not tests.util.have_ipv4(), "IPv4 not reachable")
@tests.util.retry_on_timeout
def testResolveAtAddress(self):
answer = dns.resolver.resolve_at("8.8.8.8", "dns.google.", "A")
seen = set([rdata.address for rdata in answer])
self.assertIn("8.8.8.8", seen)
self.assertIn("8.8.4.4", seen)

@unittest.skipIf(not tests.util.have_ipv4(), "IPv4 not reachable")
@tests.util.retry_on_timeout
def testResolveAtName(self):
answer = dns.resolver.resolve_at(
"dns.google", "dns.google.", "A", family=socket.AF_INET
Expand All @@ -803,10 +806,12 @@ def testResolveAtName(self):
self.assertIn("8.8.8.8", seen)
self.assertIn("8.8.4.4", seen)

@tests.util.retry_on_timeout
def testCanonicalNameNoCNAME(self):
cname = dns.name.from_text("www.google.com")
self.assertEqual(dns.resolver.canonical_name("www.google.com"), cname)

@tests.util.retry_on_timeout
def testCanonicalNameCNAME(self):
name = dns.name.from_text("www.dnspython.org")
cname = dns.name.from_text("dmfrjf4ips8xa.cloudfront.net")
Expand All @@ -815,6 +820,7 @@ def testCanonicalNameCNAME(self):
@unittest.skipIf(
_systemd_resolved_present or _is_docker, "systemd-resolved or docker in use"
)
@tests.util.retry_on_timeout
def testCanonicalNameDangling(self):
name = dns.name.from_text("dangling-cname.dnspython.org")
cname = dns.name.from_text("dangling-target.dnspython.org")
Expand Down

0 comments on commit 0cd9d0c

Please sign in to comment.