Ejemplo n.º 1
0
 def test_delete_file(self):
     hosts = ['localhost', '127.0.0.1', 'st2build001']
     client = ParallelSSHClient(hosts=hosts,
                                user='******',
                                pkey_file='~/.ssh/id_rsa',
                                connect=True)
     client.delete_file('/remote/stuff')
     for host in hosts:
         hostname, _ = client._get_host_port_info(host)
         client._hosts_client[hostname].delete_file.assert_called_with('/remote/stuff')
Ejemplo n.º 2
0
 def test_delete_file(self):
     hosts = ['localhost', '127.0.0.1', 'st2build001']
     client = ParallelSSHClient(hosts=hosts,
                                user='******',
                                pkey_file='~/.ssh/id_rsa',
                                connect=True)
     client.delete_file('/remote/stuff')
     for host in hosts:
         hostname, _ = client._get_host_port_info(host)
         client._hosts_client[hostname].delete_file.assert_called_with('/remote/stuff')
Ejemplo n.º 3
0
 def test_delete_file(self):
     hosts = ["localhost", "127.0.0.1", "st2build001"]
     client = ParallelSSHClient(hosts=hosts,
                                user="******",
                                pkey_file="~/.ssh/id_rsa",
                                connect=True)
     client.delete_file("/remote/stuff")
     for host in hosts:
         hostname, _ = client._get_host_port_info(host)
         client._hosts_client[hostname].delete_file.assert_called_with(
             "/remote/stuff")