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

Method test_name

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

Source from the content-addressed store, hash-verified

24 p.get_uint8()
25
26 def test_name(self):
27 # www.dnspython.org NS IN question
28 wire = b"\x03www\x09dnspython\x03org\x00\x00\x02\x00\x01"
29 expected = dns.name.from_text("www.dnspython.org")
30 p = dns.wire.Parser(wire)
31 self.assertEqual(p.get_name(), expected)
32 self.assertEqual(p.get_uint16(), 2)
33 self.assertEqual(p.get_uint16(), 1)
34 self.assertEqual(p.remaining(), 0)
35
36 def test_relativized_name(self):
37 # www.dnspython.org NS IN question

Callers

nothing calls this directly

Calls 4

get_nameMethod · 0.95
get_uint16Method · 0.95
remainingMethod · 0.95
from_textMethod · 0.45

Tested by

no test coverage detected