]>
git.ipfire.org Git - thirdparty/pdns.git/blob - regression-tests.recursor-dnssec/test_WellKnown.py
2 from recursortests
import RecursorTest
4 class TestWellKnown(RecursorTest
):
9 _config_template
= """dnssec=validate"""
11 def testServFail(self
):
12 names
= ['servfail.nl', 'dnssec-failed.org']
15 query
= dns
.message
.make_query(name
, 'SOA')
16 results
.append(self
.sendUDPQuery(query
, timeout
=5.0))
18 self
.assertEqual(len(results
), len(names
))
20 for result
in results
:
21 self
.assertRcodeEqual(result
, dns
.rcode
.SERVFAIL
)
23 def testNoError(self
):
24 names
= ['powerdns.com', 'nlnetlabs.nl', 'knot-dns.cz']
27 query
= dns
.message
.make_query(name
, 'SOA')
28 results
.append(self
.sendUDPQuery(query
))
30 self
.assertEqual(len(results
), len(names
))
32 for result
in results
:
33 self
.assertRcodeEqual(result
, dns
.rcode
.NOERROR
)