Index: tst_cloud_sync - treatment_screen/test.py =================================================================== diff -u -rf8bb098a23807b927e8081344aa556d1d179c837 -rc5ebcc21d4b278b866b7537b96a16342f4c77957 --- tst_cloud_sync - treatment_screen/test.py (.../test.py) (revision f8bb098a23807b927e8081344aa556d1d179c837) +++ tst_cloud_sync - treatment_screen/test.py (.../test.py) (revision c5ebcc21d4b278b866b7537b96a16342f4c77957) @@ -122,55 +122,55 @@ set_data_in_cloud_sync_output_file(eError_HeaderCount_501) utils.waitForGUI(2) - test.compare(str(verify_status(get_error_message_from_log())),ERROR_MESSAGE["501"], "message is not in unhandled.conf file. verified error message from .err file") + test.compare(str(verify_status(get_error_message_from_log("501"))),ERROR_MESSAGE["501"], "message is not in unhandled.conf file. verified error message from .err file") set_data_in_cloud_sync_output_file(eError_Timestamp_502) utils.waitForGUI(2) - test.compare(verify_status(get_error_message_from_log()),ERROR_MESSAGE["502"], "message is not in unhandled.conf file. verified error message from .err file") + test.compare(verify_status(get_error_message_from_log("502")),ERROR_MESSAGE["502"], "message is not in unhandled.conf file. verified error message from .err file") set_data_in_cloud_sync_output_file(eError_Sequence_503) utils.waitForGUI(2) - test.compare(verify_status(get_error_message_from_log()),ERROR_MESSAGE["503"], "message is not in unhandled.conf file. verified error message from .err file") + test.compare(verify_status(get_error_message_from_log("503")),ERROR_MESSAGE["503"], "message is not in unhandled.conf file. verified error message from .err file") set_data_in_cloud_sync_output_file(eError_Crc_504) utils.waitForGUI(2) - test.compare(verify_status(get_error_message_from_log()),ERROR_MESSAGE["504"], "message is not in unhandled.conf file. verified error message from .err file") + test.compare(verify_status(get_error_message_from_log("504")),ERROR_MESSAGE["504"], "message is not in unhandled.conf file. verified error message from .err file") set_data_in_cloud_sync_output_file(eError_MessageID_505) utils.waitForGUI(2) - test.compare(verify_status(get_error_message_from_log()),ERROR_MESSAGE["505"], "message is not in unhandled.conf file. verified error message from .err file") + test.compare(verify_status(get_error_message_from_log("505")),ERROR_MESSAGE["505"], "message is not in unhandled.conf file. verified error message from .err file") set_data_in_cloud_sync_output_file(eError_InvalidID_506) utils.waitForGUI(2) - test.compare(verify_status(get_error_message_from_log()),ERROR_MESSAGE["506"], "message is not in unhandled.conf file. verified error message from .err file") + test.compare(verify_status(get_error_message_from_log("506")),ERROR_MESSAGE["506"], "message is not in unhandled.conf file. verified error message from .err file") set_data_in_cloud_sync_output_file(eError_ParamCount_507) utils.waitForGUI(2) - test.compare(verify_status(get_error_message_from_log()),ERROR_MESSAGE["507"], "message is not in unhandled.conf file. verified error message from .err file") + test.compare(verify_status(get_error_message_from_log("507")),ERROR_MESSAGE["507"], "message is not in unhandled.conf file. verified error message from .err file") set_data_in_cloud_sync_output_file(eError_ParamMismatch_508) utils.waitForGUI(2) - test.compare(verify_status(get_error_message_from_log()),ERROR_MESSAGE["508"], "message is not in unhandled.conf file. verified error message from .err file") + test.compare(verify_status(get_error_message_from_log("508")),ERROR_MESSAGE["508"], "message is not in unhandled.conf file. verified error message from .err file") set_data_in_cloud_sync_output_file(eError_ParamMissing_509) utils.waitForGUI(2) - test.compare(verify_status(get_error_message_from_log()),ERROR_MESSAGE["509"], "message is not in unhandled.conf file. verified error message from .err file") + test.compare(verify_status(get_error_message_from_log("509")),ERROR_MESSAGE["509"], "message is not in unhandled.conf file. verified error message from .err file") set_data_in_cloud_sync_output_file(eError_NoHistory_510) utils.waitForGUI(2) - test.compare(verify_status(get_error_message_from_log()),ERROR_MESSAGE["510"], "message is not in unhandled.conf file. verified error message from .err file") + test.compare(verify_status(get_error_message_from_log("510")),ERROR_MESSAGE["510"], "message is not in unhandled.conf file. verified error message from .err file") set_data_in_cloud_sync_output_file(eError_CredentialMake_514) utils.waitForGUI(2) - test.compare(verify_status(get_error_message_from_log()),ERROR_MESSAGE["514"], "message is not in unhandled.conf file. verified error message from .err file") - + test.compare(verify_status(get_error_message_from_log("514")),ERROR_MESSAGE["514"], "message is not in unhandled.conf file. verified error message from .err file") + set_data_in_cloud_sync_output_file(eError_TxCodeEmpty_520) utils.waitForGUI(2) - test.compare(verify_status(get_error_message_from_log()),ERROR_MESSAGE["520"], "message is not in unhandled.conf file. verified error message from .err file") + test.compare(verify_status(get_error_message_from_log("520")),ERROR_MESSAGE["520"], "message is not in unhandled.conf file. verified error message from .err file") set_data_in_cloud_sync_output_file(eError_OutFileEmpty_521) utils.waitForGUI(2) - test.compare(verify_status(get_error_message_from_log()),ERROR_MESSAGE["521"], "message is not in unhandled.conf file. verified error message from .err file") + test.compare(verify_status(get_error_message_from_log("521")),ERROR_MESSAGE["521"], "message is not in unhandled.conf file. verified error message from .err file") @@ -205,7 +205,7 @@ test.compare(expected_cloudsync_data[index], actual_cloudsync_data[index], "cloud sync data %s is verified" %expected_cloudsync_data[index]) test.endSection() -def get_error_message_from_log(): +def get_error_message_from_log(error_num): """ This function is capable to verify the error logs from sd-card @@ -227,8 +227,9 @@ break row_length = sum(1 for values in row) try: - if row[1] != None: - return row[1] + if ("["+error_num+":") in row[1]: + if row[1] != None: + return row[1] except: pass