File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
1
import ssl
2
2
3
3
from dvc .fs import HTTPFileSystem
4
+ from fsspec .asyn import get_loop as get_fsspec_loop
5
+ from fsspec .asyn import sync
4
6
5
7
6
8
def test_public_auth_method ():
@@ -60,7 +62,10 @@ def test_ssl_verify_disable():
60
62
}
61
63
62
64
fs = HTTPFileSystem (** config )
63
- assert not fs .fs_args ["client_kwargs" ]["connector" ]._ssl
65
+ session = sync (get_fsspec_loop (), fs .fs .set_session )
66
+
67
+ # pylint: disable-next=protected-access
68
+ assert not session ._client ._connector ._ssl
64
69
65
70
66
71
def test_ssl_verify_custom_cert (mocker ):
@@ -72,10 +77,10 @@ def test_ssl_verify_custom_cert(mocker):
72
77
}
73
78
74
79
fs = HTTPFileSystem (** config )
80
+ session = sync (get_fsspec_loop (), fs .fs .set_session )
75
81
76
- assert isinstance (
77
- fs .fs_args ["client_kwargs" ]["connector" ]._ssl , ssl .SSLContext
78
- )
82
+ # pylint: disable-next=protected-access
83
+ assert isinstance (session ._client .connector ._ssl , ssl .SSLContext )
79
84
80
85
81
86
def test_http_method ():
You can’t perform that action at this time.
0 commit comments