def test_do_node_update(self): client_mock = mock.MagicMock() args = mock.MagicMock() args.node = 'node_uuid' args.op = 'add' args.attributes = [['arg1=val1', 'arg2=val2']] n_shell.do_node_update(client_mock, args) patch = commonutils.args_array_to_patch(args.op, args.attributes[0]) client_mock.node.update.assert_called_once_with('node_uuid', patch)
def test_do_node_update(self): client_mock = mock.MagicMock() args = mock.MagicMock() args.node = "node_uuid" args.op = "add" args.attributes = [["arg1=val1", "arg2=val2"]] n_shell.do_node_update(client_mock, args) patch = commonutils.args_array_to_patch(args.op, args.attributes[0]) client_mock.node.update.assert_called_once_with("node_uuid", patch)