docstrings: some cleanup
This commit is contained in:
parent
d6438aeee9
commit
3af80a631d
@ -13,9 +13,6 @@ from dns.resolver import NXDOMAIN
|
||||
|
||||
class TestQuery(object):
|
||||
def test_queries_ok(self):
|
||||
"""
|
||||
check some simple dns lookups
|
||||
"""
|
||||
assert query_ns(WWW_IPV4_HOST, 'A') == WWW_IPV4_IP # v4 ONLY
|
||||
assert query_ns(WWW_IPV6_HOST, 'AAAA') == WWW_IPV6_IP # v6 ONLY
|
||||
assert query_ns(WWW_HOST, 'A') == WWW_IPV4_IP # v4 and v6, query v4
|
||||
@ -30,9 +27,6 @@ class TestQuery(object):
|
||||
|
||||
class TestUpdate(object):
|
||||
def test_parse1(self):
|
||||
"""
|
||||
check fqdn parsing
|
||||
"""
|
||||
origin, relname = parse_name('foo.' + BASEDOMAIN)
|
||||
assert str(origin) == BASEDOMAIN + '.'
|
||||
assert str(relname) == 'foo'
|
||||
|
@ -67,9 +67,13 @@ def update_ns(fqdn, rdtype='A', ipaddr=None, origin=None, action='upd', ttl=60):
|
||||
"""
|
||||
update our master server
|
||||
|
||||
:param qname: the name to update
|
||||
:param rdtype: the record type
|
||||
:param fqdn: the fully qualified domain name to update (str)
|
||||
:param rdtype: the record type (default: 'A') (str)
|
||||
:param ipaddr: ip address (v4 or v6), if needed (str)
|
||||
:param origin: the origin zone to update (default; autodetect) (str)
|
||||
:param action: 'add', 'del' or 'upd'
|
||||
:param ttl: time to live for the added/updated resource, default 60s (int)
|
||||
:return: dns response
|
||||
"""
|
||||
assert action in ['add', 'del', 'upd', ]
|
||||
origin, name = parse_name(fqdn, origin)
|
||||
|
Loading…
x
Reference in New Issue
Block a user