summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2020-07-26 14:12:01 -0700
committerBob Halley <halley@dnspython.org>2020-07-26 14:12:01 -0700
commitcb49bfc57cbf68f0e31f0c2f541eb64a06463eca (patch)
treeb4cda590eca027d8b99489b0013a4313065dd5c0 /tests
parente4115b8619ba550dc95f5f5c18232f563ab185d3 (diff)
downloaddnspython-cb49bfc57cbf68f0e31f0c2f541eb64a06463eca.tar.gz
increase TXT coverage
Diffstat (limited to 'tests')
-rw-r--r--tests/test_rdata.py9
1 files changed, 9 insertions, 0 deletions
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):