]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
test bad class in zone
authorBob Halley <halley@dnspython.org>
Wed, 17 Jun 2020 19:29:37 +0000 (12:29 -0700)
committerBob Halley <halley@dnspython.org>
Wed, 17 Jun 2020 19:30:25 +0000 (12:30 -0700)
tests/test_zone.py

index 62de3b41bd07b8327eed58894f5e4c1d5ffc7926..635789002fd344a82e4d519dd17ac4224f17bf02 100644 (file)
@@ -695,6 +695,11 @@ class ZoneTestCase(unittest.TestCase):
             dns.zone.from_text('foo 300 in a 10.0.0.1')
         self.assertRaises(dns.zone.UnknownOrigin, bad)
 
+    def testBadClass(self):
+        def bad():
+            dns.zone.from_text('foo 300 ch txt hi', 'example.')
+        self.assertRaises(dns.exception.SyntaxError, bad)
+
     def testDangling(self):
         def bad1():
             dns.zone.from_text('foo', 'example.')