"""
name = 'query.protobuf-ipcipher.tests.powerdns.com.'
- target = b'target.protobuf-ipcipher.tests.powerdns.com.'
+ target = 'target.protobuf-ipcipher.tests.powerdns.com.'
query = dns.message.make_query(name, 'A', 'IN')
response = dns.message.make_response(query)
self.assertEquals(len(msg.response.rrs), 2)
rr = msg.response.rrs[0]
self.checkProtobufResponseRecord(rr, dns.rdataclass.IN, dns.rdatatype.CNAME, name, 3600)
- self.assertEquals(rr.rdata, target)
+ self.assertEquals(rr.rdata.decode('ascii'), target)
rr = msg.response.rrs[1]
self.checkProtobufResponseRecord(rr, dns.rdataclass.IN, dns.rdatatype.A, target, 3600)
self.assertEquals(socket.inet_ntop(socket.AF_INET, rr.rdata), '127.0.0.1')
self.assertEquals(len(msg.response.rrs), 2)
rr = msg.response.rrs[0]
self.checkProtobufResponseRecord(rr, dns.rdataclass.IN, dns.rdatatype.CNAME, name, 3600)
- self.assertEquals(rr.rdata, target)
+ self.assertEquals(rr.rdata.decode('ascii'), target)
rr = msg.response.rrs[1]
self.checkProtobufResponseRecord(rr, dns.rdataclass.IN, dns.rdatatype.A, target, 3600)
self.assertEquals(socket.inet_ntop(socket.AF_INET, rr.rdata), '127.0.0.1')
self.assertTrue(isinstance(results[oid], OctetString))
## name
- self.assertEquals(results['1.3.6.1.4.1.43315.3.2.1.2.0'], "servername")
+ self.assertEquals(str(results['1.3.6.1.4.1.43315.3.2.1.2.0']), "servername")
## weight
self.assertEquals(results['1.3.6.1.4.1.43315.3.2.1.4.0'], 1)
## outstanding
## reused
self.assertEquals(results['1.3.6.1.4.1.43315.3.2.1.7.0'], 0)
## state
- self.assertEquals(results['1.3.6.1.4.1.43315.3.2.1.8.0'], "up")
+ self.assertEquals(str(results['1.3.6.1.4.1.43315.3.2.1.8.0']), "up")
## address
- self.assertEquals(results['1.3.6.1.4.1.43315.3.2.1.9.0'], ("127.0.0.1:%s" % (self._testServerPort)))
+ self.assertEquals(str(results['1.3.6.1.4.1.43315.3.2.1.9.0']), ("127.0.0.1:%s" % (self._testServerPort)))
## pools
- self.assertEquals(results['1.3.6.1.4.1.43315.3.2.1.10.0'], "")
+ self.assertEquals(str(results['1.3.6.1.4.1.43315.3.2.1.10.0']), "")
## queries
self.assertEquals(results['1.3.6.1.4.1.43315.3.2.1.12.0'], queriesCountersValue)
## order