]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Merge pull request #177 from cdeccio/testNameFix
authorBob Halley <halley@play-bow.org>
Sat, 2 Jul 2016 21:36:50 +0000 (14:36 -0700)
committerGitHub <noreply@github.com>
Sat, 2 Jul 2016 21:36:50 +0000 (14:36 -0700)
Use meaningful test

1  2 
tests/test_name.py

index fec99211ca1b9340b4d3b5cd6d9bd638ab7930f0,e4ff9e8aca2f2488d24f6037276e2887f880410c..b530f9fbc2d1263bf87d8b6f2626b7f81524ac46
@@@ -242,18 -238,10 +242,18 @@@ class NameTestCase(unittest.TestCase)
          self.assertEqual(t, b'FOO\.bar')
  
      def testToText9(self):
-         n = dns.name.from_text(r'\x80\.bar', origin=None)
-         t = n.to_text()
-         self.assertEqual(t, br'x80\.bar')
+         n = dns.name.from_text('FOO bar', origin=None)
+         t = n.to_unicode()
+         self.assertEqual(t, r'FOO\032bar')
  
 +    def testToText10(self):
 +        t = dns.name.empty.to_unicode()
 +        self.assertEqual(t, '@')
 +
 +    def testToText11(self):
 +        t = dns.name.root.to_unicode()
 +        self.assertEqual(t, '.')
 +
      def testSlice1(self):
          n = dns.name.from_text(r'a.b.c.', origin=None)
          s = n[:]