コード例 #1
0
ファイル: test_client.py プロジェクト: haginara/ssh_config
 def test_write(self):
     configs = SSHConfig(sample)
     configs.add(new_host)
     new_sample_path = os.path.join(os.path.dirname(__file__), "sample_new")
     configs.write(filename=new_sample_path)
     new_config = SSHConfig(new_sample_path)
     os.remove(new_sample_path)
     self.assertEqual("server2", new_config.get("server2").name)
コード例 #2
0
ファイル: test_client.py プロジェクト: haginara/ssh_config
 def test_set_host(self):
     configs = SSHConfig(sample)
     configs.add(new_host)
     self.assertEqual(new_host, configs.hosts[-1])