summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2011-11-24 12:14:55 +0100
committerKai Blin <kai@samba.org>2011-11-24 14:10:44 +0100
commit9f1eb8ab8ef17a48653f3af51cfd2e678b032595 (patch)
treea030bbe79f472636772dec664d5899d7a4f58ed2 /source4/scripting/python
parent8685a35e9c3ce9d84ef8c1b9af12213701e50fa8 (diff)
downloadsamba-9f1eb8ab8ef17a48653f3af51cfd2e678b032595.tar.gz
samba-9f1eb8ab8ef17a48653f3af51cfd2e678b032595.tar.bz2
samba-9f1eb8ab8ef17a48653f3af51cfd2e678b032595.zip
s4 dns: Test QCLASS_NONE query
Autobuild-User: Kai Blin <kai@samba.org> Autobuild-Date: Thu Nov 24 14:10:45 CET 2011 on sn-devel-104
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/tests/dns.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/tests/dns.py b/source4/scripting/python/samba/tests/dns.py
index 5da96bc0e0..df10b715ef 100644
--- a/source4/scripting/python/samba/tests/dns.py
+++ b/source4/scripting/python/samba/tests/dns.py
@@ -141,6 +141,20 @@ class DNSTest(TestCase):
if dc_ipv6 is not None:
self.assertEquals(response.answers[1].rdata, dc_ipv6)
+ def test_qclass_none_query(self):
+ "create a QCLASS_NONE query"
+ p = self.make_name_packet(dns.DNS_OPCODE_QUERY)
+ questions = []
+
+ name = "%s.%s" % (os.getenv('DC_SERVER'), self.get_dns_domain())
+ q = self.make_name_question(name, dns.DNS_QTYPE_ALL, dns.DNS_QCLASS_NONE)
+ questions.append(q)
+
+ self.finish_name_packet(p, questions)
+ response = self.dns_transaction_udp(p)
+ self.assert_dns_rcode_equals(response, dns.DNS_RCODE_NOTIMP)
+
+
if __name__ == "__main__":
import unittest
unittest.main()