()
| 1204 | reason="Internet and NanoAuth required", |
| 1205 | ) |
| 1206 | def testResolverNoNameservers(): |
| 1207 | with FormErrNanoNameserver() as na: |
| 1208 | res = dns.resolver.Resolver(configure=False) |
| 1209 | res.port = na.udp_address[1] |
| 1210 | res.nameservers = [na.udp_address[0]] |
| 1211 | try: |
| 1212 | a = res.resolve("www.dnspython.org") |
| 1213 | assert False # should never happen |
| 1214 | except dns.resolver.NoNameservers as e: |
| 1215 | errors = e.kwargs["errors"] |
| 1216 | assert len(errors) == 1 |
| 1217 | for error in errors: |
| 1218 | assert error[0] == f"Do53:{na.udp_address[0]}@{na.udp_address[1]}" |
| 1219 | assert not error[1] # not TCP |
| 1220 | assert error[2] == na.udp_address[1] # port |
| 1221 | assert error[3] == "FORMERR" |
| 1222 | |
| 1223 | |
| 1224 | class SlowAlwaysType3NXDOMAINNanoNameserver(Server): |
nothing calls this directly
no test coverage detected
searching dependent graphs…