def test_insert_c_operation_list(monkeypatch): """ insert_c_operation_list()のテスト """ core = create_ita1core() core.restobj.rest_set_config(get_configs()) comobj = ActionDriverCommonModules() rand = 'aaaaa' operation_data = [0] * Cstobj.TBL_COL_MAX operation_data[Cstobj.COL_FUNCTION_NAME] = '登録' operation_data[ Cstobj. COL_OPERATION_NAME] = rand + core.trace_id + core.execution_order operation_data[Cstobj.COL_OPERATION_DATE] = comobj.getStringNowDate() monkeypatch.setattr(core.restobj, 'rest_insert', method_dummy_true) is_registered = core._insert_c_operation_list(operation_data) assert is_registered == 0
def test_insert_b_ansible_pho_link(monkeypatch): """ insert_b_ansible_pho_link()のテスト """ core = create_ita1core() configs = get_configs() comobj = ActionDriverCommonModules() rand = 'aaaaa' target_table = 'C_OPERATION_LIST' ary_config = '' insert_row_data = '' operation_data = [0] * Cstobj.TBL_COL_MAX operation_data[Cstobj.COL_FUNCTION_NAME] = '登録' operation_data[ Cstobj. COL_OPERATION_NAME] = rand + core.trace_id + core.execution_order operation_data[Cstobj.COL_OPERATION_DATE] = comobj.getStringNowDate() monkeypatch.setattr(core.restobj, 'rest_insert', method_dummy_true) is_registered = core._insert_b_ansible_pho_link(target_table, insert_row_data) assert is_registered == 0