コード例 #1
0
 def test_remove_ssh_config(self):
     config = os.path.expanduser("~/.ssh/config")
     try:
         sc = SSHConfig.load(config)
     except:  # pylint: disable=bare-except
         sc = SSHConfig(config)
     for host in list(self.clusters.values()):
         sc.remove(host)
     sc.write()
コード例 #2
0
ファイル: test_client.py プロジェクト: haginara/ssh_config
 def test_remove(self):
     config = SSHConfig(sample)
     config.remove("server1")
     with self.assertRaises(NameError):
         config.get("server1")