diff options
Diffstat (limited to 'ipapython')
| -rw-r--r-- | ipapython/dnsutil.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ipapython/dnsutil.py b/ipapython/dnsutil.py index 6ff500b22..e8d2f6ff6 100644 --- a/ipapython/dnsutil.py +++ b/ipapython/dnsutil.py @@ -188,6 +188,18 @@ def assert_absolute_dnsname(name): def is_auto_empty_zone(zone): - """True if specified zone name exactly matches an automatic empty zone.""" - assert isinstance(zone, DNSName) + """True if specified zone name exactly matches an automatic empty zone. + + >>> is_auto_empty_zone(DNSName('in-addr.arpa.')) + False + >>> is_auto_empty_zone(DNSName('10.in-addr.arpa.')) + True + >>> is_auto_empty_zone(DNSName('1.10.in-addr.arpa.')) + False + >>> is_auto_empty_zone(DNSName('10.in-addr.arpa')) + Traceback (most recent call last): + ... + AssertionError: ... + """ + assert_absolute_dnsname(zone) return zone in EMPTY_ZONES |
