コード例 #1
0
 def testMINFO(self):
     """Test DNS 'MINFO' record queries"""
     return self.namesTest(
         self.resolver.lookupMailboxInfo('test-domain.com'), [
             dns.Record_MINFO(
                 rmailbx='r mail box', emailbx='e mail box', ttl=19283784)
         ])
コード例 #2
0
 def test_MINFO(self):
     """Test DNS 'MINFO' record queries"""
     return self.namesTest(
         self.resolver.lookupMailboxInfo("test-domain.com"),
         [
             dns.Record_MINFO(
                 rmailbx="r mail box", emailbx="e mail box", ttl=19283784)
         ],
     )
コード例 #3
0
ファイル: test_dns.py プロジェクト: bopopescu/cc-2
 def test_minfo(self):
     """
     The repr of a L{dns.Record_MINFO} instance includes the rmailbx,
     emailbx, and TTL fields of the record.
     """
     self.assertEqual(
         repr(dns.Record_MINFO('alice.example.com', 'bob.example.com', 15)),
         "<MINFO responsibility=alice.example.com "
         "errors=bob.example.com ttl=15>")
コード例 #4
0
ファイル: test_dns.py プロジェクト: bopopescu/cc-2
 def test_minfo(self):
     """
     Two L{dns.Record_MINFO} instances compare equal if and only if they
     have the same rmailbx, emailbx, and ttl.
     """
     # Vary the rmailbx
     self._equalityTest(dns.Record_MINFO('rmailbox', 'emailbox', 10),
                        dns.Record_MINFO('rmailbox', 'emailbox', 10),
                        dns.Record_MINFO('someplace', 'emailbox', 10))
     # Vary the emailbx
     self._equalityTest(dns.Record_MINFO('rmailbox', 'emailbox', 10),
                        dns.Record_MINFO('rmailbox', 'emailbox', 10),
                        dns.Record_MINFO('rmailbox', 'something', 10))
     # Vary the ttl
     self._equalityTest(dns.Record_MINFO('rmailbox', 'emailbox', 10),
                        dns.Record_MINFO('rmailbox', 'emailbox', 10),
                        dns.Record_MINFO('rmailbox', 'emailbox', 100))
コード例 #5
0
     dns.Record_SPF('v=spf1 mx/30 mx:example.org/30 -all'),
     dns.Record_SPF('v=spf1 +mx a:\0colo',
                    '.example.com/28 -all not valid'),
     dns.Record_MX(10, 'host.test-domain.com'),
     dns.Record_HINFO(os='Linux', cpu='A Fast One, Dontcha know'),
     dns.Record_CNAME('canonical.name.com'),
     dns.Record_MB('mailbox.test-domain.com'),
     dns.Record_MG('mail.group.someplace'),
     dns.Record_TXT('A First piece of Text', 'a SecoNd piece'),
     dns.Record_A6(0, 'ABCD::4321', ''),
     dns.Record_A6(12, '0:0069::0', 'some.network.tld'),
     dns.Record_A6(8, '0:5634:1294:AFCB:56AC:48EF:34C3:01FF',
                   'tra.la.la.net'),
     dns.Record_TXT('Some more text, haha!  Yes.  \0  Still here?'),
     dns.Record_MR('mail.redirect.or.whatever'),
     dns.Record_MINFO(rmailbx='r mail box', emailbx='e mail box'),
     dns.Record_AFSDB(subtype=1, hostname='afsdb.test-domain.com'),
     dns.Record_RP(mbox='whatever.i.dunno', txt='some.more.text'),
     dns.Record_WKS('12.54.78.12', socket.IPPROTO_TCP,
                    '\x12\x01\x16\xfe\xc1\x00\x01'),
     dns.Record_NAPTR(100, 10, "u", "sip+E2U",
                      "!^.*$!sip:[email protected]!"),
     dns.Record_AAAA('AF43:5634:1294:AFCB:56AC:48EF:34C3:01FF')
 ],
 'http.tcp.test-domain.com':
 [dns.Record_SRV(257, 16383, 43690, 'some.other.place.fool')],
 'host.test-domain.com': [
     dns.Record_A('123.242.1.5'),
     dns.Record_A('0.255.0.255'),
 ],
 'host-two.test-domain.com': [
コード例 #6
0
     dns.Record_SPF(b"v=spf1 mx/30 mx:example.org/30 -all"),
     dns.Record_SPF(b"v=spf1 +mx a:\0colo",
                    b".example.com/28 -all not valid"),
     dns.Record_MX(10, "host.test-domain.com"),
     dns.Record_HINFO(os=b"Linux", cpu=b"A Fast One, Dontcha know"),
     dns.Record_CNAME(b"canonical.name.com"),
     dns.Record_MB(b"mailbox.test-domain.com"),
     dns.Record_MG(b"mail.group.someplace"),
     dns.Record_TXT(b"A First piece of Text", b"a SecoNd piece"),
     dns.Record_A6(0, b"ABCD::4321", b""),
     dns.Record_A6(12, b"0:0069::0", b"some.network.tld"),
     dns.Record_A6(8, b"0:5634:1294:AFCB:56AC:48EF:34C3:01FF",
                   b"tra.la.la.net"),
     dns.Record_TXT(b"Some more text, haha!  Yes.  \0  Still here?"),
     dns.Record_MR(b"mail.redirect.or.whatever"),
     dns.Record_MINFO(rmailbx=b"r mail box", emailbx=b"e mail box"),
     dns.Record_AFSDB(subtype=1, hostname=b"afsdb.test-domain.com"),
     dns.Record_RP(mbox=b"whatever.i.dunno", txt=b"some.more.text"),
     dns.Record_WKS(b"12.54.78.12", socket.IPPROTO_TCP,
                    b"\x12\x01\x16\xfe\xc1\x00\x01"),
     dns.Record_NAPTR(100, 10, b"u", b"sip+E2U",
                      b"!^.*$!sip:[email protected]!"),
     dns.Record_AAAA(b"AF43:5634:1294:AFCB:56AC:48EF:34C3:01FF"),
 ],
 b"http.tcp.test-domain.com":
 [dns.Record_SRV(257, 16383, 43690, b"some.other.place.fool")],
 b"host.test-domain.com": [
     dns.Record_A(b"123.242.1.5"),
     dns.Record_A(b"0.255.0.255"),
 ],
 b"host-two.test-domain.com": [