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()
def test_remove(self): config = SSHConfig(sample) config.remove("server1") with self.assertRaises(NameError): config.get("server1")