def create_server(host, username=None): if not username: return servers.from_conf(host) return servers.Server(host, username)
def test_no_conf(self): server = servers.from_conf("development", config_file="/i/dont/exist") self.assertTrue(isinstance(server, servers.Server))
def test_creation(self): server = servers.from_conf("development", config_file=self.ssh_config) self.assertTrue(isinstance(server, servers.Server))
def __call__(self, parser, namespace, values, option_string=None): setattr(namespace, self.dest, servers.from_conf(values))
def test_no_conf(self): server = servers.from_conf('development', config_file='/i/dont/exist') self.assertTrue(isinstance(server, servers.Server))
def test_creation(self): server = servers.from_conf('development', config_file=self.ssh_config) self.assertTrue(isinstance(server, servers.Server))