@@ -1249,7 +1249,7 @@ def prepare_sftp_file_tests(client):
12491249 )
12501250 return ssh , _sftp
12511251
1252- def test_exists (self , client , policy , logger ):
1252+ def test_exists (self , client , * args ):
12531253 ssh , _sftp = self .prepare_sftp_file_tests (client )
12541254 lstat = mock .Mock ()
12551255 _sftp .attach_mock (lstat , "lstat" )
@@ -1269,7 +1269,7 @@ def test_exists(self, client, policy, logger):
12691269 self .assertFalse (result )
12701270 lstat .assert_called_once_with (dst )
12711271
1272- def test_stat (self , client , policy , logger ):
1272+ def test_stat (self , client , * args ):
12731273 ssh , _sftp = self .prepare_sftp_file_tests (client )
12741274 stat = mock .Mock ()
12751275 _sftp .attach_mock (stat , "stat" )
@@ -1285,7 +1285,7 @@ def test_stat(self, client, policy, logger):
12851285 self .assertEqual (result .st_uid , 0 )
12861286 self .assertEqual (result .st_gid , 0 )
12871287
1288- def test_isfile (self , client , policy , logger ):
1288+ def test_isfile (self , client , * args ):
12891289 class Attrs (object ):
12901290 def __init__ (self , mode ):
12911291 self .st_mode = mode
@@ -1318,7 +1318,7 @@ def __init__(self, mode):
13181318 self .assertFalse (result )
13191319 lstat .assert_called_once_with (dst )
13201320
1321- def test_isdir (self , client , policy , logger ):
1321+ def test_isdir (self , client , * args ):
13221322 class Attrs (object ):
13231323 def __init__ (self , mode ):
13241324 self .st_mode = mode
@@ -1352,11 +1352,11 @@ def __init__(self, mode):
13521352
13531353 @mock .patch ("exec_helpers.ssh_client.SSHClient.exists" )
13541354 @mock .patch ("exec_helpers.ssh_client.SSHClient.execute" )
1355- def test_mkdir (self , execute , exists , client , policy , logger ):
1355+ def test_mkdir (self , execute , exists , * args ):
13561356 exists .side_effect = [False , True ]
13571357
13581358 dst = "~/tst dir"
1359- escaped_dst = "~/tst\ dir"
1359+ escaped_dst = r "~/tst\ dir"
13601360
13611361 # noinspection PyTypeChecker
13621362 ssh = exec_helpers .SSHClient (
@@ -1379,7 +1379,7 @@ def test_mkdir(self, execute, exists, client, policy, logger):
13791379 execute .assert_not_called ()
13801380
13811381 @mock .patch ("exec_helpers.ssh_client.SSHClient.execute" )
1382- def test_rm_rf (self , execute , client , policy , logger ):
1382+ def test_rm_rf (self , execute , * args ):
13831383 dst = "~/tst"
13841384
13851385 # noinspection PyTypeChecker
@@ -1392,7 +1392,7 @@ def test_rm_rf(self, execute, client, policy, logger):
13921392 ssh .rm_rf (dst )
13931393 execute .assert_called_once_with ("rm -rf {}" .format (dst ))
13941394
1395- def test_open (self , client , policy , logger ):
1395+ def test_open (self , client , * args ):
13961396 ssh , _sftp = self .prepare_sftp_file_tests (client )
13971397 fopen = mock .Mock (return_value = True )
13981398 _sftp .attach_mock (fopen , "open" )
@@ -1437,7 +1437,7 @@ def test_download(self, isdir, remote_isdir, exists, remote_exists, logger, clie
14371437
14381438 @mock .patch ("exec_helpers.ssh_client.SSHClient.isdir" )
14391439 @mock .patch ("os.path.isdir" , autospec = True )
1440- def test_upload_file (self , isdir , remote_isdir , client , policy , logger ):
1440+ def test_upload_file (self , isdir , remote_isdir , client , * args ):
14411441 ssh , _sftp = self .prepare_sftp_file_tests (client )
14421442 isdir .return_value = False
14431443 remote_isdir .return_value = False
@@ -1455,7 +1455,7 @@ def test_upload_file(self, isdir, remote_isdir, client, policy, logger):
14551455 @mock .patch ("os.walk" )
14561456 @mock .patch ("exec_helpers.ssh_client.SSHClient.isdir" )
14571457 @mock .patch ("os.path.isdir" , autospec = True )
1458- def test_upload_dir (self , isdir , remote_isdir , walk , mkdir , exists , client , policy , logger ):
1458+ def test_upload_dir (self , isdir , remote_isdir , walk , mkdir , exists , client , * args ):
14591459 ssh , _sftp = self .prepare_sftp_file_tests (client )
14601460 isdir .return_value = True
14611461 remote_isdir .return_value = True
0 commit comments