Index: tst_unhandled_message_log/test.py =================================================================== diff -u -rbcc793abed8c23b99913cf4360edc200c65652f0 -r6bb43117bca2673c5de877f5b70b094da344418a --- tst_unhandled_message_log/test.py (.../test.py) (revision bcc793abed8c23b99913cf4360edc200c65652f0) +++ tst_unhandled_message_log/test.py (.../test.py) (revision 6bb43117bca2673c5de877f5b70b094da344418a) @@ -22,8 +22,8 @@ from configuration import utility from configuration import config from dialin.utils.conversions import float_to_bytearray, integer_to_bytearray,unsigned_integer_to_bytearray +from time import sleep - hd_simulator = HDSimulator() LOCATION = '/home/denali/Projects/application/resources/settings/Messages/Unhandled.conf' @@ -103,19 +103,20 @@ with open(file_name, 'r') as csv_file: try: for row in reversed(list(csv.reader(csv_file))): - if row[0].isalpha(): + print(row) +# if row[0].isalpha(): +# pass +# else: + if count == 30: + test.fail("handler unable to find message text from error file.") + break + row_length = sum(1 for values in row) + try: + if row[1] != None and row[1] != ERROR_MESSAGE['SD_CARD_STORAGE_WARNING']: + return row[1] + except: pass - else: - if count == 30: - test.fail("handler unable to find message text from error file.") - break - row_length = sum(1 for values in row) - try: - if row[1] != None and row[1] != ERROR_MESSAGE['SD_CARD_STORAGE_WARNING']: - return row[1] - except: - pass - count+=1 + count+=1 except: test.fail("application error log data is corrupted") except: @@ -189,13 +190,13 @@ #checking if the message is not in the unhandled (err) test.startSection("verify the message is not in unhandled (err)") - hd_simulator.cmd_send_hd_general_response(message_id = 275, accepted = 1, reason = 1) + hd_simulator.cmd_send_hd_general_response(message_id = 350, accepted = 1, reason = 1) unhandled_message = get_error_message_from_log() test.log(str(unhandled_message)) test.compare(unhandled_message, ERROR_MESSAGE["UNHANDLED_API"], "message is not in unhandled.conf file. verified error message from .err file") #checking if the message is not in the unhandled (err) - hd_simulator.cmd_send_hd_general_response(message_id = 276, accepted = 1, reason = 1) + hd_simulator.cmd_send_hd_general_response(message_id = 351, accepted = 1, reason = 1) unhandled_status = get_error_message_from_log() test.compare(unhandled_message, ERROR_MESSAGE["UNHANDLED_API"], "message is not in unhandled.conf file. verified error message from .err file") test.endSection()