summaryrefslogtreecommitdiffstats
path: root/tests-extra/tests/records/huge_rrset
diff options
context:
space:
mode:
authorDaniel Salzman <daniel.salzman@nic.cz>2017-01-29 21:01:50 +0100
committerDaniel Salzman <daniel.salzman@nic.cz>2017-01-29 21:01:50 +0100
commitbf87c6745608a360106115ef532d83bdd4cca636 (patch)
tree3ae5e8b3029cee8a24272fdd9bacd8a82bb4f688 /tests-extra/tests/records/huge_rrset
parentrrset-dump: print TSIG other data as integer instead of hex string (diff)
downloadknot-bf87c6745608a360106115ef532d83bdd4cca636.tar.xz
knot-bf87c6745608a360106115ef532d83bdd4cca636.zip
tests-extra: udapt test huge_rrset to fixed dnspython 1.16.0
Diffstat (limited to 'tests-extra/tests/records/huge_rrset')
-rw-r--r--tests-extra/tests/records/huge_rrset/test.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/tests-extra/tests/records/huge_rrset/test.py b/tests-extra/tests/records/huge_rrset/test.py
index 91edeca22..3926015c8 100644
--- a/tests-extra/tests/records/huge_rrset/test.py
+++ b/tests-extra/tests/records/huge_rrset/test.py
@@ -39,17 +39,18 @@ resp.check_count(0, section="answer")
resp = master.dig(ZONE, "AXFR", tries=1, timeout=5)
got_messages = 0
-
-for msg in resp.resp:
+last_rcode = None
+
+try:
+ for msg in resp.resp:
+ got_messages += 1
+ last_rcode = msg.rcode()
+ compare(msg.rcode(), dns.rcode.NOERROR, "rcode")
+except dns.query.TransferError as e:
got_messages += 1
- if got_messages is 1:
- isset(msg.rcode() == dns.rcode.NOERROR, "NOERROR")
- elif got_messages is 2:
- isset(msg.rcode() == dns.rcode.SERVFAIL, "SERVFAIL")
- break
-
-if got_messages != 2:
- set_err("AXFR MSGCOUNT")
- detail_log("!AXFR message count: %i != 1" % got_messages)
+ last_rcode = e.rcode
+
+compare(got_messages, 2, "axfr message count")
+compare(last_rcode, dns.rcode.SERVFAIL, "last rcode")
t.end()