]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
tests/pydnstest: add support for DNS 0x20
authorMarek Vavruša <marek.vavrusa@nic.cz>
Wed, 24 Jun 2015 17:26:48 +0000 (19:26 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Wed, 24 Jun 2015 17:26:48 +0000 (19:26 +0200)
tests/pydnstest/scenario.py

index 2a9d05749eb547fe1025eb48783636370ae8291e..4b2a760bc2469863bc603d3fa35e2b5e20e265c2 100644 (file)
@@ -35,11 +35,13 @@ class Entry:
         elif code == 'qname':
             if len(expected.question) == 0:
                 return True
-            return self.__compare_val(expected.question[0].name, msg.question[0].name)
+            qname = dns.name.from_text(msg.question[0].name.to_text().lower())
+            return self.__compare_val(expected.question[0].name, qname)
         elif code == 'subdomain':
             if len(expected.question) == 0:
                 return True
-            return self.__compare_sub(expected.question[0].name, msg.question[0].name)
+            qname = dns.name.from_text(msg.question[0].name.to_text().lower())
+            return self.__compare_sub(expected.question[0].name, qname)
         elif code == 'flags':
             return self.__compare_val(dns.flags.to_text(expected.flags), dns.flags.to_text(msg.flags))
         elif code == 'question':
@@ -73,6 +75,7 @@ class Entry:
         answer = dns.message.from_text(self.message.to_text())
         if 'copy_id' in self.adjust_fields:
             answer.id = query.id
+            answer.question[0].name = query.question[0].name
         if 'copy_query' in self.adjust_fields:
             answer.question = query.question
         return answer