From: Bob Halley Date: Wed, 17 Jun 2020 19:29:37 +0000 (-0700) Subject: test bad class in zone X-Git-Tag: v2.0.0rc1~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8bed16c499d2f344d3f1c07bf0087b1a2e4eae2;p=thirdparty%2Fdnspython.git test bad class in zone --- diff --git a/tests/test_zone.py b/tests/test_zone.py index 62de3b41..63578900 100644 --- a/tests/test_zone.py +++ b/tests/test_zone.py @@ -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.')