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

Method test_create_explicit

test/mitmproxy/test_certs.py:57–64  ·  view source on GitHub ↗
(self, tmpdir)

Source from the content-addressed store, hash-verified

55
56class TestCertStore:
57 def test_create_explicit(self, tmpdir):
58 ca = certs.CertStore.from_store(str(tmpdir), "test", 2048)
59 assert ca.get_cert("foo", [])
60
61 ca2 = certs.CertStore.from_store(str(tmpdir), "test", 2048)
62 assert ca2.get_cert("foo", [])
63
64 assert ca.default_ca.serial == ca2.default_ca.serial
65
66 def test_create_no_common_name(self, tstore):
67 assert tstore.get_cert(None, []).cert.cn is None

Callers

nothing calls this directly

Calls 2

from_storeMethod · 0.80
get_certMethod · 0.45

Tested by

no test coverage detected