Commit e1282e34 authored by Hamza Baqa's avatar Hamza Baqa

sending the reports to the stores

parent bc9a4414
......@@ -104,6 +104,10 @@ to_send.append(val_3_obj)
os.remove(file_to_validate_path)
#sending to rep
ioppytest_cli._ui_display_markdown_text("Sending the report to repository ............ ")
ioppytest_cli._results_store_insert_result(val1)
#Display result
#call(["ioppytest-cli", "gui_display_message",res.text])
ioppytest_cli._ui_display_markdown_text(tabulate(to_send, headers=['Type of Errors', 'Errors'], tablefmt="grid"))
......
......@@ -123,4 +123,14 @@ to_send.append(val_2_obj)
to_send.append(val_3_obj)
#sending to rep
to_send_repo = {}
ioppytest_cli._ui_display_markdown_text("Sending the report to repository ............ ")
to_send_repo[wrap("Query result of :"+ conf_li_1[0] + ':' + conf_li_1[1] + " from: " + session_user[0])] = val_1_obj[1]
to_send_repo[wrap("Query result of :"+ conf_li_1[0] + ':' + conf_li_1[1] + " from: " + session_user[1])] = val_2_obj[1]
to_send_repo["Veridict"] = val_3_obj[1]
json_to_send_repo = json.dumps(to_send_repo)
ioppytest_cli._results_store_insert_result(json_to_send_repo)
ioppytest_cli._ui_display_markdown_text(tabulate(to_send, tablefmt="grid"))
......@@ -97,6 +97,8 @@ val_1_obj = []
val_1_obj.append("Veridict")
val_1_obj.append(common_onto(dico_to_ont_list_ontopath(j_1),dico_to_ont_list_ontopath(j_2)))
val_2_obj = []
val_2_obj.append("User "+session_user[0] + " ref ontologies")
val_2_obj.append(dico_to_ont_list_ontoname(j_1))
......@@ -115,4 +117,15 @@ to_send.append(val_1_obj)
to_send.append(val_2_obj)
to_send.append(val_3_obj)
#sending to rep
to_send_repo = {}
ioppytest_cli._ui_display_markdown_text("Sending the report to repository ............ ")
to_send_repo["Veridict"] = val_1_obj[1]
to_send_repo["User "+session_user[0] + " ref ontologies"] = val_2_obj[1]
to_send_repo["User "+session_user[1] + " ref ontologies"] = val_3_obj[1]
json_to_send_repo = json.dumps(to_send_repo)
ioppytest_cli._results_store_insert_result(json_to_send_repo)
ioppytest_cli._ui_display_markdown_text(tabulate(to_send, tablefmt="grid"))
......@@ -1342,6 +1342,10 @@ def _save_file_from_base64(filename, base64_encoded_file, dir=None):
nb = pcap_file.write(base64.b64decode(base64_encoded_file))
return nb
#insert result to repo
def _results_store_insert_result(message):
m= MsgInsertResultRequest(data=message)
_publish_message(m)
# # # AMQP connection, channel, publish and requests/replies handling # # #
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment