Skip to content

Commit 5d145cc

Browse files
committed
FTPFS: Fix opener test, and add extra test for the FTPS opener.
1 parent 2abeac8 commit 5d145cc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/test_opener.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,11 @@ def test_user_data_opener(self, app_dir):
300300
def test_open_ftp(self, mock_FTPFS):
301301
open_fs("ftp://foo:bar@ftp.example.org")
302302
mock_FTPFS.assert_called_once_with(
303-
"ftp.example.org", passwd="bar", port=21, user="foo", proxy=None, timeout=10
303+
"ftp.example.org", passwd="bar", port=21, user="foo", proxy=None, timeout=10, tls=False
304+
)
305+
open_fs("ftps://foo:bar@ftp.example.org")
306+
mock_FTPFS.assert_called_once_with(
307+
"ftp.example.org", passwd="bar", port=21, user="foo", proxy=None, timeout=10, tls=True
304308
)
305309

306310
@mock.patch("fs.ftpfs.FTPFS")
@@ -313,4 +317,5 @@ def test_open_ftp_proxy(self, mock_FTPFS):
313317
user="foo",
314318
proxy="ftp.proxy.org",
315319
timeout=10,
320+
tls=False,
316321
)

0 commit comments

Comments
 (0)