MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / test_https_record_ech

Method test_https_record_ech

test/mitmproxy/test_dns.py:84–95  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

82 assert rr.text == "sample text"
83
84 def test_https_record_ech(self):
85 rr = dns.ResourceRecord(
86 "test", dns.types.ANY, dns.classes.IN, dns.ResourceRecord.DEFAULT_TTL, b""
87 )
88 params = {3: b"\x01\xbb"}
89 record = dns.https_records.HTTPSRecord(1, "example.org", params)
90 rr.data = dns.https_records.pack(record)
91 assert rr.https_ech is None
92 rr.https_ech = "dGVzdHN0cmluZwo="
93 assert rr.https_ech == "dGVzdHN0cmluZwo="
94 rr.https_ech = None
95 assert rr.https_ech is None
96
97 def test_https_record_alpn(self):
98 rr = dns.ResourceRecord(

Callers

nothing calls this directly

Calls 1

packMethod · 0.80

Tested by

no test coverage detected