diff options
author | Bob Halley <halley@dnspython.org> | 2006-01-10 23:15:41 +0000 |
---|---|---|
committer | Bob Halley <halley@dnspython.org> | 2006-01-10 23:15:41 +0000 |
commit | 282d7476c1efb455dcc1a1dee2a4cf61928e9faa (patch) | |
tree | 4bc6a61c54d499c23323456274124a7a18f6a252 /tests | |
parent | 498f2e786d06c38dc4bf0a16f9cf2f1c89603df6 (diff) | |
download | dnspython-282d7476c1efb455dcc1a1dee2a4cf61928e9faa.tar.gz |
allow BIND 8 TTL syntax in ttl-like places (SOA, SIG, RRSIG)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/bugs.py b/tests/bugs.py index 8fa9cb5..f038005 100644 --- a/tests/bugs.py +++ b/tests/bugs.py @@ -18,6 +18,7 @@ import unittest import dns.rdata import dns.rdataclass import dns.rdatatype +import dns.ttl class BugsTestCase(unittest.TestCase): @@ -27,5 +28,17 @@ class BugsTestCase(unittest.TestCase): self.failUnless(rdata.float_latitude == 30.5) self.failUnless(rdata.float_longitude == -100.5) + def test_SOA_BIND8_TTL(self): + rdata1 = dns.rdata.from_text(dns.rdataclass.IN, dns.rdatatype.SOA, + "a b 100 1s 1m 1h 1d") + rdata2 = dns.rdata.from_text(dns.rdataclass.IN, dns.rdatatype.SOA, + "a b 100 1 60 3600 86400") + self.failUnless(rdata1 == rdata2) + + def test_TTL_bounds_check(self): + def bad(): + ttl = dns.ttl.from_text("2147483648") + self.failUnlessRaises(dns.ttl.BadTTL, bad) + if __name__ == '__main__': unittest.main() |