(self)
| 244 | MagicMock(return_value=False), |
| 245 | ) |
| 246 | def test_delete_dir(self): |
| 247 | hosts = ["localhost", "127.0.0.1", "st2build001"] |
| 248 | client = ParallelSSHClient( |
| 249 | hosts=hosts, user="ubuntu", pkey_file="~/.ssh/id_rsa", connect=True |
| 250 | ) |
| 251 | client.delete_dir("/remote/stuff/", force=True) |
| 252 | expected_kwargs = {"force": True, "timeout": None} |
| 253 | for host in hosts: |
| 254 | hostname, _ = client._get_host_port_info(host) |
| 255 | client._hosts_client[hostname].delete_dir.assert_called_with( |
| 256 | "/remote/stuff/", **expected_kwargs |
| 257 | ) |
| 258 | |
| 259 | @patch("paramiko.SSHClient", Mock) |
| 260 | @patch.object( |
nothing calls this directly
no test coverage detected