Ticket #2276: test_names.py.patch

File test_names.py.patch, 1.2 KB (added by agatonsax, 10 years ago)

Patch to names/testnames.py

  • test/test_names.py

    old new  
    7979            dns.Record_AFSDB(subtype=1, hostname='afsdb.test-domain.com'),
    8080            dns.Record_RP(mbox='whatever.i.dunno', txt='some.more.text'),
    8181            dns.Record_WKS('12.54.78.12', socket.IPPROTO_TCP, '\x12\x01\x16\xfe\xc1\x00\x01'),
     82                dns.Record_NAPTR(100,10,"u","sip+E2U","!^.*$!sip:information@tele2.se!"),
    8283            dns.Record_AAAA('AF43:5634:1294:AFCB:56AC:48EF:34C3:01FF')],
    8384        'http.tcp.test-domain.com': [
    8485            dns.Record_SRV(257, 16383, 43690, 'some.other.place.fool')
     
    378379            self.resolver.lookupAddress("anothertest-domain.com"),
    379380            [dns.Record_A('1.2.3.4', ttl=19283784)]
    380381        )
     382
     383    def testNAPTR(self):
     384        """Test DNS 'NAPTR' record queries"""
     385        return self.namesTest(
     386            self.resolver.lookupNAPTR('test-domain.com'),
     387            [dns.Record_NAPTR(100,10,"u","sip+E2U","!^.*$!sip:information@tele2.se!",ttl=19283784)]
     388        )
    381389           
    382390class HelperTestCase(unittest.TestCase):
    383391    def testSerialGenerator(self):