]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
authtests.py: fix rcode comparison and reporting
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Mon, 31 May 2021 14:46:22 +0000 (16:46 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Sun, 6 Jun 2021 17:40:46 +0000 (19:40 +0200)
regression-tests.auth-py/authtests.py

index c80311ec4da9af6f451e0bae039b76053725e8fd..f9bbe80b4349648aba700e583e354a822caa23a5 100644 (file)
@@ -547,8 +547,8 @@ options {
                 raise TypeError("rcode is neither a str nor int")
 
         if msg.rcode() != rcode:
-            msgRcode = dns.rcode._by_value[msg.rcode()]
-            wantedRcode = dns.rcode._by_value[rcode]
+            msgRcode = dns.rcode.to_text(msg.rcode())
+            wantedRcode = dns.rcode.to_text(rcode)
 
             raise AssertionError("Rcode for %s is %s, expected %s." % (msg.question[0].to_text(), msgRcode, wantedRcode))