def _test_update_lb(self, args, expected_values): resource = 'loadbalancer' cmd_resource = 'lbaas_loadbalancer' my_id = 'myid' args.insert(0, my_id) cmd = lb.UpdateLoadBalancer(test_cli20.MyApp(sys.stdout), None) self._test_update_resource(resource, cmd, my_id, args, expected_values, cmd_resource=cmd_resource)
def test_update_loadbalancer(self): """lbaas-loadbalancer-loadbalancer-update myid --name newname.""" resource = 'loadbalancer' cmd_resource = 'lbaas_loadbalancer' cmd = lb.UpdateLoadBalancer(test_cli20.MyApp(sys.stdout), None) self._test_update_resource(resource, cmd, 'myid', ['myid', '--name', 'newname'], { 'name': 'newname', }, cmd_resource=cmd_resource)