summaryrefslogtreecommitdiff
path: root/tests/test_zone.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_zone.py')
-rw-r--r--tests/test_zone.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/test_zone.py b/tests/test_zone.py
index 31e7405..551530a 100644
--- a/tests/test_zone.py
+++ b/tests/test_zone.py
@@ -129,7 +129,7 @@ class ZoneTestCase(unittest.TestCase):
for n in names:
print >> f, z[n].to_text(n)
self.failUnless(f.getvalue() == example_text_output)
-
+
def testTorture1(self):
#
# Read a zone containing all our supported RR types, and
@@ -385,5 +385,14 @@ class ZoneTestCase(unittest.TestCase):
relativize=True)
self.failUnlessRaises(dns.exception.SyntaxError, bad)
+ def testFirstRRStartsWithWhitespace(self):
+ # no name is specified, so default to the intial origin
+ # no ttl is specified, so default to the initial TTL of 0
+ z = dns.zone.from_text(' IN A 10.0.0.1', origin='example.',
+ check_origin=False)
+ n = z['@']
+ rds = n.get_rdataset(dns.rdataclass.IN, dns.rdatatype.A)
+ self.failUnless(rds.ttl == 0)
+
if __name__ == '__main__':
unittest.main()