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

Method test_relativized_name

tests/test_wire.py:36–43  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

34 self.assertEqual(p.remaining(), 0)
35
36 def test_relativized_name(self):
37 # www.dnspython.org NS IN question
38 wire = b"\x03www\x09dnspython\x03org\x00\x00\x02\x00\x01"
39 origin = dns.name.from_text("dnspython.org")
40 expected = dns.name.from_text("www", None)
41 p = dns.wire.Parser(wire)
42 self.assertEqual(p.get_name(origin), expected)
43 self.assertEqual(p.remaining(), 4)
44
45 def test_compressed_name(self):
46 # www.dnspython.org NS IN question

Callers

nothing calls this directly

Calls 3

get_nameMethod · 0.95
remainingMethod · 0.95
from_textMethod · 0.45

Tested by

no test coverage detected