summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Halley <halley@play-bow.org>2015-12-03 09:17:54 -0800
committerBob Halley <halley@play-bow.org>2015-12-03 09:17:54 -0800
commit5bce45eabb3a4987d197f11afc42d5b37d33c430 (patch)
treefec55a8887db7711353b8b3b27140eba62eca083
parent2f1ce2415a8b3fd03445edc6dfbbc819dd954a53 (diff)
parent719b047fc453ec7f3f9ebd1e6bce4fd0885263ff (diff)
downloaddnspython-5bce45eabb3a4987d197f11afc42d5b37d33c430.tar.gz
Merge pull request #106 from encukou/deduplicate-tests
Rename tests with duplicate names
-rw-r--r--tests/test_flags.py2
-rw-r--r--tests/test_name.py4
-rw-r--r--tests/test_ntoaaton.py16
-rw-r--r--tests/test_rdtypeandclass.py4
4 files changed, 5 insertions, 21 deletions
diff --git a/tests/test_flags.py b/tests/test_flags.py
index 41372cd..95fd455 100644
--- a/tests/test_flags.py
+++ b/tests/test_flags.py
@@ -38,7 +38,7 @@ class FlagsTestCase(unittest.TestCase):
self.assertTrue(dns.rcode.from_flags(0, 0x01000000) == \
dns.rcode.BADVERS)
- def test_rcode6(self):
+ def test_rcode6a(self):
self.assertTrue(dns.rcode.from_flags(5, 0) == dns.rcode.REFUSED)
def test_rcode7(self):
diff --git a/tests/test_name.py b/tests/test_name.py
index 7a2a026..e62b558 100644
--- a/tests/test_name.py
+++ b/tests/test_name.py
@@ -114,7 +114,7 @@ class NameTestCase(unittest.TestCase):
def testAbs3(self):
self.assertTrue(self.origin.is_absolute())
- def testAbs3(self):
+ def testAbs4(self):
n = dns.name.from_text('foo', origin=None)
self.assertTrue(not n.is_absolute())
@@ -300,7 +300,7 @@ class NameTestCase(unittest.TestCase):
r = n1 + n2
self.assertTrue(r == e)
- def testConcat2(self):
+ def testConcat2a(self):
n1 = dns.name.Name([])
n2 = dns.name.Name(['a', 'b'])
e = dns.name.Name(['a', 'b'])
diff --git a/tests/test_ntoaaton.py b/tests/test_ntoaaton.py
index 92ccc81..56c671b 100644
--- a/tests/test_ntoaaton.py
+++ b/tests/test_ntoaaton.py
@@ -67,22 +67,6 @@ class NtoAAtoNTestCase(unittest.TestCase):
a = aton6('1:2:3:4:5:6:7:8:9')
self.assertRaises(dns.exception.SyntaxError, bad)
- def test_aton1(self):
- a = aton6('::')
- self.assertTrue(a == b'\x00' * 16)
-
- def test_aton2(self):
- a = aton6('::1')
- self.assertTrue(a == b'\x00' * 15 + b'\x01')
-
- def test_aton3(self):
- a = aton6('::10.0.0.1')
- self.assertTrue(a == b'\x00' * 12 + b'\x0a\x00\x00\x01')
-
- def test_aton4(self):
- a = aton6('abcd::dcba')
- self.assertTrue(a == b'\xab\xcd' + b'\x00' * 12 + b'\xdc\xba')
-
def test_ntoa1(self):
b = bytes.fromhex('00010002000300040005000600070008')
t = ntoa6(b)
diff --git a/tests/test_rdtypeandclass.py b/tests/test_rdtypeandclass.py
index 69b77f4..d2849d3 100644
--- a/tests/test_rdtypeandclass.py
+++ b/tests/test_rdtypeandclass.py
@@ -52,7 +52,7 @@ class RdTypeAndClassTestCase(unittest.TestCase):
def test_class_totext1(self):
self.assertTrue(dns.rdataclass.to_text(dns.rdataclass.IN) == 'IN')
- def test_class_totext1(self):
+ def test_class_totext2(self):
self.assertTrue(dns.rdataclass.to_text(999) == 'CLASS999')
def test_class_totext_bounds1(self):
@@ -106,7 +106,7 @@ class RdTypeAndClassTestCase(unittest.TestCase):
def test_type_totext1(self):
self.assertTrue(dns.rdatatype.to_text(dns.rdatatype.A) == 'A')
- def test_type_totext1(self):
+ def test_type_totext2(self):
self.assertTrue(dns.rdatatype.to_text(999) == 'TYPE999')
def test_type_totext_bounds1(self):