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

Method test_EDNS_options_wire

tests/test_message.py:164–171  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

162 self.assertEqual(str(m), query_text_2)
163
164 def test_EDNS_options_wire(self):
165 m = dns.message.make_query("foo", "A")
166 opt = dns.edns.GenericOption(3, b"data")
167 m.use_edns(options=[opt])
168 m2 = dns.message.from_wire(m.to_wire())
169 self.assertEqual(m2.edns, 0)
170 self.assertEqual(len(m2.options), 1)
171 self.assertEqual(m2.options[0], opt)
172
173 def test_keeping_wire(self):
174 m = dns.message.from_wire(goodwire)

Callers

nothing calls this directly

Calls 2

use_ednsMethod · 0.45
to_wireMethod · 0.45

Tested by

no test coverage detected