From cb49bfc57cbf68f0e31f0c2f541eb64a06463eca Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Sun, 26 Jul 2020 14:12:01 -0700 Subject: increase TXT coverage --- tests/test_rdata.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/test_rdata.py b/tests/test_rdata.py index 82d150d..8d9937e 100644 --- a/tests/test_rdata.py +++ b/tests/test_rdata.py @@ -614,6 +614,15 @@ class RdataTestCase(unittest.TestCase): '20200101000000 2003010100000 ' + '2143 foo Ym9ndXM=') + def test_empty_TXT(self): + # hit too long + with self.assertRaises(dns.exception.SyntaxError): + dns.rdata.from_text('in', 'txt', '') + + def test_too_long_TXT(self): + # hit too long + with self.assertRaises(dns.exception.SyntaxError): + dns.rdata.from_text('in', 'txt', 'a' * 256) class UtilTestCase(unittest.TestCase): -- cgit v1.2.1