Index: tst_main_treatment_heparin/test.py =================================================================== diff -u -r8022d2716a79cbb147fa8976606720c566a7b864 -ra8e96f0ed647ecb75b83f64e0ecb3a3310b78314 --- tst_main_treatment_heparin/test.py (.../test.py) (revision 8022d2716a79cbb147fa8976606720c566a7b864) +++ tst_main_treatment_heparin/test.py (.../test.py) (revision a8e96f0ed647ecb75b83f64e0ecb3a3310b78314) @@ -46,7 +46,7 @@ test.startSection("Verifying Heparin State 3 HEPARIN_INITIAL_BOLUS values") hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state= 0, heparin_state= 3, rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state= 0, treatment_stop_state=0) + treatment_end_state= 0, treatment_stop_state=0, dialysis_state=0) test.compare(str(waitForObjectExists(names.state0_heparin_delivery_text).text), config.HEPARIN_DELIVERY_TEXT, "Heparin Delivery Text should be {}".format(config.HEPARIN_DELIVERY_TEXT)) test.compare((waitForObjectExists(names.state0_heparin_delivery_text)).enabled, False, "Heparin Delivery should be disabled") initial_bolus_text = waitForObjectExists(names.state3_heparin_state_initial_bolus_text).text @@ -73,7 +73,7 @@ test.log("Verifying Heparin State 0 - HEPARIN_STATE_OFF") hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state= 0, heparin_state= 0, rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state= 0, treatment_stop_state=0) + treatment_end_state= 0, treatment_stop_state=0, dialysis_state=0) test.compare(str(waitForObjectExists(names.state0_heparin_delivery_text).text), config.HEPARIN_DELIVERY_TEXT, "Heparin Delivery Text should be {}".format(config.HEPARIN_DELIVERY_TEXT)) test.compare((waitForObjectExists(names.state0_heparin_delivery_text)).enabled, False, "Heparin Delivery should be disabled") test.log("Verifying Notification Message") @@ -83,7 +83,7 @@ test.log("Verifying Heparin State 1 - HEPARIN_STATE_STOPPED") hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state= 1, rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state=0, treatment_stop_state= 0) + treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0) test.compare(str(waitForObjectExists(names.state0_heparin_delivery_text).text), config.HEPARIN_DELIVERY_TEXT, "Heparin Delivery Text should be {}".format(config.HEPARIN_DELIVERY_TEXT)) test.compare((waitForObjectExists(names.state0_heparin_delivery_text)).enabled, False, "Heparin Delivery should be disabled") test.log("Verifying Notification Message") @@ -96,7 +96,7 @@ test.log("Verifying Heparin State 5 - HEPARIN_STATE_COMPLETED") hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state= 5, rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state=0, treatment_stop_state= 0) + treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0) test.compare(str(waitForObjectExists(names.state0_heparin_delivery_text).text), config.HEPARIN_DELIVERY_TEXT, "Heparin Delivery Text should be {}".format(config.HEPARIN_DELIVERY_TEXT)) test.compare((waitForObjectExists(names.state0_heparin_delivery_text)).enabled, False, "Heparin Delivery should be disabled") @@ -107,7 +107,7 @@ test.log("Verifying Heparin State 6 - HEPARIN_STATE_EMPTY") hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state= 6, rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state=0, treatment_stop_state= 0) + treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0) test.compare(str(waitForObjectExists(names.state0_heparin_delivery_text).text), config.HEPARIN_DELIVERY_TEXT, "Heparin Delivery Text should be {}".format(config.HEPARIN_DELIVERY_TEXT)) test.compare((waitForObjectExists(names.state0_heparin_delivery_text)).enabled, False, "Heparin Delivery should be disabled") @@ -122,11 +122,11 @@ HEPARIN STATE 2 -> HEPARIN_STATE_PAUSED HEPARIN STATE 4 -> HEPARIN_STATE_DISPENSING """ - hd_simulator.cmd_set_heparin_pause_resume_response(accepted = 1, reason = 1, state = 2) + hd_simulator.cmd_set_heparin_pause_resume_response(accepted = 1, reason = 1) hd_simulator.cmd_set_treatment_heparin_data(cumulative = 10) hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state= 2, rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state=0, treatment_stop_state= 0) + treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0) test.compare(str(waitForObjectExists(names.state2_heparin_state_paused_text).text),config.HEPARIN_RESUME_DELIVERY_TEXT,"Heparin Resume Delivery Text should be {}".format(config.HEPARIN_RESUME_DELIVERY_TEXT)) test.compare( waitForObjectExists(names.state2_heparin_state_paused_text).enabled, True, "Resume Delivery Button is enabled") @@ -135,7 +135,7 @@ hd_simulator.cmd_set_treatment_heparin_data(cumulative = 10.1) hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state= 4, rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state=0, treatment_stop_state= 0) + treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0) test.compare(str(waitForObjectExists(names.state4_heparin_state_dispensing_text).text), config.HEPARIN_PAUSE_DELIVERY_TEXT,"Heparin Pause Delivery Text should be {}".format(config.HEPARIN_PAUSE_DELIVERY_TEXT)) test.compare( waitForObjectExists(names.state4_heparin_state_dispensing_text).enabled , True, "Pause Delivery Button is enabled") test.log("Heparin delivery is in dispensing state") @@ -150,9 +150,9 @@ test.startSection("Verifying Rejection Messages") hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state= 4, rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state=0, treatment_stop_state= 0) + treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0) for reason_id in range(1, config.NUM_OF_REQUEST_REJECT_REASONS+1): - hd_simulator.cmd_set_heparin_pause_resume_response(accepted=0, reason=reason_id, state=2) + hd_simulator.cmd_set_heparin_pause_resume_response(accepted=0, reason=reason_id) rejection_msg = waitForObjectExists(utility.rejection_msg(text=config.REJECTION_REASON[reason_id])) test.compare(rejection_msg.text, config.REJECTION_REASON[reason_id], "The rejection message should be {}".format(config.REJECTION_REASON[reason_id])) test.endSection()