コード例 #1
0
ファイル: test_dns.py プロジェクト: bopopescu/cc-2
 def test_mr(self):
     """
     The repr of a L{dns.Record_MR} instance includes the name of the
     mail rename domain and the TTL of the record.
     """
     self.assertEqual(repr(dns.Record_MR('example.com', 4321)),
                      "<MR name=example.com ttl=4321>")
コード例 #2
0
 def testMR(self):
     """Test DNS 'MR' record queries"""
     return self.namesTest(
         self.resolver.lookupMailRename('test-domain.com'),
         [dns.Record_MR('mail.redirect.or.whatever', ttl=19283784)])
コード例 #3
0
     dns.Record_NS('39.28.189.39'),
     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'),
 ],
コード例 #4
0
     dns.Record_NS(b"39.28.189.39"),
     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"),
 ],