Index: suite_leahi/tst_main_treatment/test.py =================================================================== diff -u -r7ef176d3f63909e4f1c7df096f0b2d6499d164ef -ra268022a7006d25f990f52e3bdef82139e3664c6 --- suite_leahi/tst_main_treatment/test.py (.../test.py) (revision 7ef176d3f63909e4f1c7df096f0b2d6499d164ef) +++ suite_leahi/tst_main_treatment/test.py (.../test.py) (revision a268022a7006d25f990f52e3bdef82139e3664c6) @@ -33,13 +33,14 @@ import can -from leahi_dialin.ui import utils -from leahi_dialin.protocols import CAN -from leahi_dialin.ui.td_messaging import TD_Messaging -from leahi_dialin.ui.dd_messaging import DD_Messaging -from configuration import utility -from leahi_dialin.common.td_defs import TDOpModes,TDTreatmentStates -from leahi_dialin.common.msg_defs import MsgIds, MsgFieldPositions +from leahi_dialin.ui import utils +from leahi_dialin.protocols import CAN +from leahi_dialin.ui.td_messaging import TD_Messaging +from leahi_dialin.ui.dd_messaging import DD_Messaging +from configuration import utility +from leahi_dialin.common.td_defs import TDOpModes,TDTreatmentStates +from leahi_dialin.common.msg_defs import MsgIds, MsgFieldPositions +from leahi_dialin.utils import conversions ART_LOW_VAL_MINUS_390 = -390 @@ -319,20 +320,15 @@ state,index = conversions.bytearray_to_integer(message, index) global pause - pause = str(state) - - + pause = state + def handle_vitals_request( message, timestamp = 0.0): """ Called when the user requests to firmware from UI @return: None """ - message = message['message'] - index = MsgFieldPositions.START_POS_FIELD_1 - - state,index = conversions.bytearray_to_integer(message, index) global vitals - vitals = str(state) + vitals = True def main(): @@ -396,7 +392,8 @@ #Test New UF pause/Resume button pauseResume = waitForObject(names.o_treatmentHome_iconImage_Image_main,1000) mouseClick(waitForObject(pauseResume)) - test.verify(waitFor( lambda: pause == 0, 5000), "Testing FW received from the UI") + global pause + test.verify(waitFor( lambda: pause == 0, 1000), "Testing FW received from the UI") td.td_ultrafiltration( set_volume = 1.2 , target_rate = 0.5 , volume_delivered = 0.2 , @@ -418,8 +415,8 @@ message_id, handle_vitals_request) - - test.verify(waitFor( lambda: vitals == "Requested", 5000), "Testing FW received from the UI") + global vitals + test.verify(waitFor( lambda: vitals == True, 1000), "Testing FW received from the UI") #TX Time #Calculating total seconds into minutes and passing to treatment time verification test.startSection("Verifying TX time on main treatment screen")