diff options
| author | Bob Halley <halley@dnspython.org> | 2020-07-26 14:12:01 -0700 |
|---|---|---|
| committer | Bob Halley <halley@dnspython.org> | 2020-07-26 14:12:01 -0700 |
| commit | cb49bfc57cbf68f0e31f0c2f541eb64a06463eca (patch) | |
| tree | b4cda590eca027d8b99489b0013a4313065dd5c0 /tests | |
| parent | e4115b8619ba550dc95f5f5c18232f563ab185d3 (diff) | |
| download | dnspython-cb49bfc57cbf68f0e31f0c2f541eb64a06463eca.tar.gz | |
increase TXT coverage
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_rdata.py | 9 |
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): |
