Index: tst_Treatment_Adjustment_BloodDialysate/test.py =================================================================== diff -u -r93fe289e1e33e4b2cf824e30f810490f073ecab3 -rcea779e4d5eb422603a9194f6b9a01ec7e268612 --- tst_Treatment_Adjustment_BloodDialysate/test.py (.../test.py) (revision 93fe289e1e33e4b2cf824e30f810490f073ecab3) +++ tst_Treatment_Adjustment_BloodDialysate/test.py (.../test.py) (revision cea779e4d5eb422603a9194f6b9a01ec7e268612) @@ -13,7 +13,9 @@ # import names -from dialin.ui import utils, hd_simulator +from dialin.ui import utils +from dialin import HDSimulator +HDSimulator = HDSimulator() def gotoScreenNtest_Contains_FlowsSection(): @@ -33,14 +35,14 @@ gotoScreenNtest_Contains_FlowsSection() utils.waitForGUI(1) - hd_simulator.setTreatmentBloodFlowRate(175, 0, 0, 0, 0, 0, 0) - hd_simulator.setTreatmentDialysateFlowRate(250, 1, 1, 1, 1, 1, 1) + HDSimulator.setTreatmentBloodFlowRate(175, 0, 0, 0, 0, 0, 0) + HDSimulator.setTreatmentDialysateFlowRate(250, 1, 1, 1, 1, 1, 1) gotoScreenNTest_Adjustment() utils.waitForGUI(1) - hd_simulator.setTreatmentParamRanges(0, 0, 0, 0, 150, 550) - hd_simulator.send_acknowledge_UI() + HDSimulator.setTreatmentParamRanges(0, 0, 0, 0, 150, 550) + HDSimulator.send_acknowledge_UI() mouseClick(waitForObject(names.o_bloodFlowSlider_Slider), 190, 4, Qt.LeftButton) mouseClick(waitForObject(names.o_dialysateFlowSlider_Slider), 79, 5, Qt.LeftButton) @@ -50,17 +52,17 @@ # sendTreatmentAdjustBloodDialysateRequest mouseClick(waitForObject(names.o_confirmButton)) - hd_simulator.waitForMessageToBeSent() + HDSimulator.waitForMessageToBeSent() utils.waitForGUI(7) # wait for ack timeout 5 is the timeout added +2 Sec for safe range. # sendTreatmentAdjustBloodDialysateRequest again mouseClick(waitForObject(names.o_confirmButton)) - hd_simulator.waitForMessageToBeSent() - hd_simulator.send_acknowledge_HD() + HDSimulator.waitForMessageToBeSent() + HDSimulator.send_acknowledge_HD() - hd_simulator.sendTreatmentAdjustBloodDialysateResponse(0, 3, 125, 150) # coverage - hd_simulator.sendTreatmentAdjustBloodDialysateResponse(0, 3, 125, 150) # coverage - hd_simulator.sendTreatmentAdjustBloodDialysateResponse(0, 3, 175, 250) + HDSimulator.sendTreatmentAdjustBloodDialysateResponse(0, 3, 125, 150) # coverage + HDSimulator.sendTreatmentAdjustBloodDialysateResponse(0, 3, 125, 150) # coverage + HDSimulator.sendTreatmentAdjustBloodDialysateResponse(0, 3, 175, 250) utils.waitForGUI(2) mouseClick(waitForObject(names.o_bloodFlowSlider_Slider), 190, 4, Qt.LeftButton) @@ -69,12 +71,12 @@ test.compare(waitForObjectExists(names.o_bloodFlowSlider_Slider).value, 225) test.compare(waitForObjectExists(names.o_dialysateFlowSlider_Slider).value, 200) - hd_simulator.sendTreatmentAdjustBloodDialysateResponse(1, 0, + HDSimulator.sendTreatmentAdjustBloodDialysateResponse(1, 0, waitForObjectExists(names.o_bloodFlowSlider_Slider).value, waitForObjectExists(names.o_dialysateFlowSlider_Slider).value ) - hd_simulator.setTreatmentBloodFlowRate(225, 1, 1, 1, 1, 1, 1) - hd_simulator.setTreatmentDialysateFlowRate(200, 0, 0, 0, 0, 0, 0) + HDSimulator.setTreatmentBloodFlowRate(225, 1, 1, 1, 1, 1, 1) + HDSimulator.setTreatmentDialysateFlowRate(200, 0, 0, 0, 0, 0, 0) test.compare(str(waitForObjectExists(names.o_treatmentStart_225_Text).text), "225") test.compare(str(waitForObjectExists(names.o_treatmentStart_200_Text).text), "200")