Skip to content
Snippets Groups Projects
Commit fefa311a authored by Marek Vavruša's avatar Marek Vavruša
Browse files

tests/pydnstest: add support for DNS 0x20

parent 3908d846
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment