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

Method test_convert

test/mitmproxy/test_certs.py:324–334  ·  view source on GitHub ↗
(self, tdata)

Source from the content-addressed store, hash-verified

322 assert c1 != c2
323
324 def test_convert(self, tdata):
325 with open(tdata.path("mitmproxy/net/data/text_cert"), "rb") as f:
326 d = f.read()
327 c = certs.Cert.from_pem(d)
328
329 assert c == certs.Cert.from_pem(c.to_pem())
330 assert c == certs.Cert.from_state(c.get_state())
331 with pytest.deprecated_call():
332 assert c == certs.Cert.from_pyopenssl(c.to_pyopenssl())
333
334 assert c == certs.Cert(c.to_cryptography())
335
336 @pytest.mark.parametrize(
337 "filename,name,bits",

Callers

nothing calls this directly

Calls 9

from_pemMethod · 0.80
to_pemMethod · 0.80
from_pyopensslMethod · 0.80
to_pyopensslMethod · 0.80
to_cryptographyMethod · 0.80
pathMethod · 0.45
readMethod · 0.45
from_stateMethod · 0.45
get_stateMethod · 0.45

Tested by

no test coverage detected