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

Method test_opt_short_lengths

tests/test_rdata.py:526–532  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

524 self.assertEqual(repr(opt), "<DNS CLASS4096 OPT rdata: >")
525
526 def test_opt_short_lengths(self):
527 with self.assertRaises(dns.exception.FormError):
528 parser = dns.wire.Parser(bytes.fromhex("f00102"))
529 OPT.from_wire_parser(4096, dns.rdatatype.OPT, parser)
530 with self.assertRaises(dns.exception.FormError):
531 parser = dns.wire.Parser(bytes.fromhex("f00100030000"))
532 OPT.from_wire_parser(4096, dns.rdatatype.OPT, parser)
533
534 def test_from_wire_parser(self):
535 wire = bytes.fromhex("01020304")

Callers

nothing calls this directly

Calls 1

from_wire_parserMethod · 0.45

Tested by

no test coverage detected