def test_mg(self): """ The repr of a L{dns.Record_MG} instance includes the name of the mail group memeber and the TTL of the record. """ self.assertEqual(repr(dns.Record_MG('example.com', 4321)), "<MG name=example.com ttl=4321>")
def testMG(self): """Test DNS 'MG' record queries""" return self.namesTest( self.resolver.lookupMailGroup('test-domain.com'), [dns.Record_MG('mail.group.someplace', ttl=19283784)])
test_domain_com = NoFileAuthority( soa=('test-domain.com', soa_record), records={ 'test-domain.com': [ soa_record, dns.Record_A('127.0.0.1'), 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')
test_domain_com = NoFileAuthority( soa=(b"test-domain.com", soa_record), records={ b"test-domain.com": [ soa_record, dns.Record_A(b"127.0.0.1"), 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"),