]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Pylint: tests: fix redefined functions
authorMartin <martin.basti@gmail.com>
Sat, 2 Jul 2016 00:30:08 +0000 (02:30 +0200)
committerMartin <martin.basti@gmail.com>
Sat, 2 Jul 2016 00:41:33 +0000 (02:41 +0200)
This fix increases number of tests from
Ran 424 tests in 13.300s
to
Ran 435 tests in 13.679s

tests/test_flags.py
tests/test_grange.py
tests/test_name.py
tests/test_ntoaaton.py
tests/test_rdtypeandclass.py

index 2ed534954edaf932ff16fd1777e20b8fc7556dfa..9d230ac1edd9415580a364d648fa1bcb6d879aa6 100644 (file)
@@ -41,10 +41,10 @@ class FlagsTestCase(unittest.TestCase):
         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)
index bdb64b7021462191c8755ff6188d26109442ec5a..567f8a3404561164443c40a3b36f1dacd74498cd 100644 (file)
@@ -80,7 +80,7 @@ class GRangeTestCase(unittest.TestCase):
             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
index b01544e02bb69f9f833ce87e5b576eeaf506f004..2cfabda3691fa310f307520130475aaa159ef537 100644 (file)
@@ -116,7 +116,7 @@ class NameTestCase(unittest.TestCase):
     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())
 
@@ -307,28 +307,28 @@ class NameTestCase(unittest.TestCase):
         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'])
@@ -559,7 +559,7 @@ class NameTestCase(unittest.TestCase):
         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)
index b45689c83f9971a948126316497c1e68eeb17efb..ac72403ceed739da520609e8e253f40ccc9d095c 100644 (file)
@@ -73,19 +73,19 @@ class NtoAAtoNTestCase(unittest.TestCase):
             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')
 
index e040d8d2f2fa2f015bfc6abf61050121201aaaf2..733eda563b5704b93f63db641e98f688ead07a05 100644 (file)
@@ -55,7 +55,7 @@ class RdTypeAndClassTestCase(unittest.TestCase):
     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):
@@ -109,7 +109,7 @@ class RdTypeAndClassTestCase(unittest.TestCase):
     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):