self.failUnless(dns.rcode.from_flags(0, 0x01000000) == \
dns.rcode.BADVERS)
- def test_rcode6(self):
+ def test_rcode7(self):
self.failUnless(dns.rcode.from_flags(5, 0) == dns.rcode.REFUSED)
- def test_rcode7(self):
+ def test_rcode8(self):
def bad():
dns.rcode.to_flags(4096)
self.failUnlessRaises(ValueError, bad)
dns.grange.from_text('%s-%d/%d' % (start, stop, step))
self.assertRaises(dns.exception.SyntaxError, bad)
- def testFailFromText2(self):
+ def testFailFromText3(self):
def bad():
start = 1
stop = 4
def testAbs3(self):
self.failUnless(self.origin.is_absolute())
- def testAbs3(self):
+ def testAbs4(self):
n = dns.name.from_text('foo', origin=None)
self.failUnless(not n.is_absolute())
r = n1 + n2
self.failUnless(r == e)
- def testConcat2(self):
+ def testConcat3(self):
n1 = dns.name.Name([])
n2 = dns.name.Name(['a', 'b'])
e = dns.name.Name(['a', 'b'])
r = n1 + n2
self.failUnless(r == e)
- def testConcat3(self):
+ def testConcat4(self):
n1 = dns.name.Name(['a', 'b', ''])
n2 = dns.name.Name([])
e = dns.name.Name(['a', 'b', ''])
r = n1 + n2
self.failUnless(r == e)
- def testConcat4(self):
+ def testConcat5(self):
n1 = dns.name.Name(['a', 'b'])
n2 = dns.name.Name(['c', ''])
e = dns.name.Name(['a', 'b', 'c', ''])
r = n1 + n2
self.failUnless(r == e)
- def testConcat5(self):
+ def testConcat6(self):
def bad():
n1 = dns.name.Name(['a', 'b', ''])
n2 = dns.name.Name(['c'])
self.failUnless(n1 == en1 and cused1 == ecused1 and \
n2 == en2 and cused2 == ecused2)
- def testFromWire1(self):
+ def testFromWire2(self):
w = b'\x03foo\x00\x01a\xc0\x00\x01b\xc0\x05'
current = 0
(n1, cused1) = dns.name.from_wire(w, current)
a = aton6('1:2:3:4:5:6:7:8:9')
self.failUnlessRaises(dns.exception.SyntaxError, bad)
- def test_aton1(self):
+ def test_aton6(self):
a = aton6('::')
self.assertEqual(a, b'\x00' * 16)
- def test_aton2(self):
+ def test_aton7(self):
a = aton6('::1')
self.assertEqual(a, b'\x00' * 15 + b'\x01')
- def test_aton3(self):
+ def test_aton8(self):
a = aton6('::10.0.0.1')
self.assertEqual(a, b'\x00' * 12 + b'\x0a\x00\x00\x01')
- def test_aton4(self):
+ def test_aton9(self):
a = aton6('abcd::dcba')
self.assertEqual(a, b'\xab\xcd' + b'\x00' * 12 + b'\xdc\xba')
def test_class_totext1(self):
self.failUnless(dns.rdataclass.to_text(dns.rdataclass.IN) == 'IN')
- def test_class_totext1(self):
+ def test_class_totext2(self):
self.failUnless(dns.rdataclass.to_text(999) == 'CLASS999')
def test_class_totext_bounds1(self):
def test_type_totext1(self):
self.failUnless(dns.rdatatype.to_text(dns.rdatatype.A) == 'A')
- def test_type_totext1(self):
+ def test_type_totext2(self):
self.failUnless(dns.rdatatype.to_text(999) == 'TYPE999')
def test_type_totext_bounds1(self):