Skip to content

Commit 332ed63

Browse files
committed
tests: fix ssl_verify_{disable,custom_cert}
1 parent 417f88a commit 332ed63

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

dvc_http/tests/test_config.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import ssl
22

33
from dvc.fs import HTTPFileSystem
4+
from fsspec.asyn import get_loop as get_fsspec_loop
5+
from fsspec.asyn import sync
46

57

68
def test_public_auth_method():
@@ -60,7 +62,10 @@ def test_ssl_verify_disable():
6062
}
6163

6264
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
6469

6570

6671
def test_ssl_verify_custom_cert(mocker):
@@ -72,10 +77,10 @@ def test_ssl_verify_custom_cert(mocker):
7277
}
7378

7479
fs = HTTPFileSystem(**config)
80+
session = sync(get_fsspec_loop(), fs.fs.set_session)
7581

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)
7984

8085

8186
def test_http_method():

0 commit comments

Comments
 (0)