File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -27,23 +27,27 @@ def test_get_storage_init_args():
27
27
@pytest .mark .asyncio
28
28
async def test_request_ssl ():
29
29
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
+ ):
31
34
await http .request (
32
35
"GET" ,
33
36
"https://self-signed.badssl.com/" ,
34
37
session = session ,
35
38
)
36
- assert "certificate verify failed" in str (excinfo .value )
37
39
38
- # XXX FIXME
39
40
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
+ )
47
51
48
52
49
53
def fingerprint_of_cert (cert , hash = hashes .SHA256 ) -> str :
You can’t perform that action at this time.
0 commit comments