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

Method test_padding_with_tsig_and_option

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

Source from the content-addressed store, hash-verified

923 self.assertEqual(q, q2)
924
925 def test_padding_with_tsig_and_option(self):
926 keyring = dns.tsigkeyring.from_text({"keyname.": "NjHwPsMKjdN++dOfE5iAiQ=="})
927 options = [dns.edns.ECSOption("1.2.3.0", 24)]
928 q = dns.message.make_query(
929 "www.example", "a", use_edns=0, options=options, pad=128
930 )
931 q.use_tsig(keyring)
932 w = q.to_wire()
933 self.assertEqual(len(w), 256)
934 q2 = dns.message.from_wire(w, keyring=keyring)
935 self.assertIsNotNone(q2.tsig)
936 self.assertEqual(q, q2)
937
938 def test_response_padding(self):
939 q = dns.message.make_query("www.example", "a", use_edns=0, pad=128)

Callers

nothing calls this directly

Calls 3

from_textMethod · 0.45
use_tsigMethod · 0.45
to_wireMethod · 0.45

Tested by

no test coverage detected