diff --git a/test/mitmproxy/addons/test_tlsconfig.py b/test/mitmproxy/addons/test_tlsconfig.py index 115d92c0c..2f203713d 100644 --- a/test/mitmproxy/addons/test_tlsconfig.py +++ b/test/mitmproxy/addons/test_tlsconfig.py @@ -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