Skip to content

Commit c1d3efb

Browse files
committed
Make broken test as xfail
1 parent c55b969 commit c1d3efb

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

tests/system/utils/test_main.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,27 @@ def test_get_storage_init_args():
2727
@pytest.mark.asyncio
2828
async def test_request_ssl():
2929
async with aiohttp.ClientSession() as session:
30-
with pytest.raises(aiohttp.ClientConnectorCertificateError) as excinfo:
30+
with pytest.raises(
31+
aiohttp.ClientConnectorCertificateError,
32+
match="certificate verify failed",
33+
):
3134
await http.request(
3235
"GET",
3336
"https://self-signed.badssl.com/",
3437
session=session,
3538
)
36-
assert "certificate verify failed" in str(excinfo.value)
3739

38-
# XXX FIXME
3940

40-
with pytest.raises(Exception):
41-
await http.request(
42-
"GET",
43-
"https://self-signed.badssl.com/",
44-
verify=False,
45-
session=session,
46-
)
41+
@pytest.mark.xfail(reason="feature not implemented")
42+
@pytest.mark.asyncio
43+
async def test_request_unsafe_ssl():
44+
async with aiohttp.ClientSession() as session:
45+
await http.request(
46+
"GET",
47+
"https://self-signed.badssl.com/",
48+
verify=False,
49+
session=session,
50+
)
4751

4852

4953
def fingerprint_of_cert(cert, hash=hashes.SHA256) -> str:

0 commit comments

Comments
 (0)