catch malformed cert warning in tests
we may need to catch this properly in `get_cert` at some point, let's see if this ever turns out to be an issue.
This commit is contained in:
parent
9803c90341
commit
2dd845ed95
|
@ -86,7 +86,8 @@ class TestTlsConfig:
|
|||
|
||||
with open(tdata.path("mitmproxy/data/invalid-subject.pem"), "rb") as f:
|
||||
ctx.server.certificate_list = [certs.Cert.from_pem(f.read())]
|
||||
assert ta.get_cert(ctx) # does not raise
|
||||
with pytest.warns(UserWarning, match="Country names should be two characters"):
|
||||
assert ta.get_cert(ctx) # does not raise
|
||||
|
||||
def test_tls_clienthello(self):
|
||||
# only really testing for coverage here, there's no point in mirroring the individual conditions
|
||||
|
|
Loading…
Reference in New Issue