MCPcopy Create free account
hub / github.com/rthalley/dnspython / do_test_node_flags

Function do_test_node_flags

tests/test_btreezone.py:38–55  ·  view source on GitHub ↗
(relativize: bool)

Source from the content-addressed store, hash-verified

36
37
38def do_test_node_flags(relativize: bool):
39 z = make_example(simple_zone, relativize)
40 n = cast(Node, z.get_node("@"))
41 assert not n.is_delegation()
42 assert not n.is_glue()
43 assert n.is_origin()
44 assert n.is_origin_or_glue()
45 assert n.is_immutable()
46 n = cast(Node, z.get_node("sub"))
47 assert n.is_delegation()
48 assert not n.is_glue()
49 assert not n.is_origin()
50 assert not n.is_origin_or_glue()
51 n = cast(Node, z.get_node("ns1.sub"))
52 assert not n.is_delegation()
53 assert n.is_glue()
54 assert not n.is_origin()
55 assert n.is_origin_or_glue()
56
57
58def test_node_flags_absolute():

Callers 2

test_node_flags_absoluteFunction · 0.85
test_node_flags_relativeFunction · 0.85

Calls 7

make_exampleFunction · 0.85
is_delegationMethod · 0.80
is_originMethod · 0.80
is_origin_or_glueMethod · 0.80
get_nodeMethod · 0.45
is_glueMethod · 0.45
is_immutableMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…