Index: tests/test_hd_simulator.py =================================================================== diff -u -rc8bb93ad343033f2d0de5918c155a82281fe7102 -rc864e886bc1b52d3a43f03c507425248c44a913f --- tests/test_hd_simulator.py (.../test_hd_simulator.py) (revision c8bb93ad343033f2d0de5918c155a82281fe7102) +++ tests/test_hd_simulator.py (.../test_hd_simulator.py) (revision c864e886bc1b52d3a43f03c507425248c44a913f) @@ -17,11 +17,9 @@ import sys sys.path.append("..") -from dialin.ui.hd_proxy import HDSimulator, RequestRejectReasons -from dialin.ui.hd_proxy_alarms import Alarms +from dialin.ui.hd_simulator import HDSimulator, RequestRejectReasons from dialin.hd.hemodialysis_device import HD from dialin.utils.base import AbstractObserver -from dialin.squish.denaliMessages import clear_all_alarms from time import sleep @@ -77,18 +75,6 @@ sleep(1) -def test_clear_alarms(): - hd_simulator = HDSimulator() - - hd_simulator.alarms.cmd_activate_alarm(Alarms.ALARM_ID_COMM_TOO_MANY_BAD_CRCS) - sleep(3) - hd_simulator.alarms.cmd_send_clear_alarms() - sleep(3) - hd_simulator.alarms.cmd_activate_alarm(Alarms.ALARM_ID_COMM_TOO_MANY_BAD_CRCS) - sleep(3) - hd_simulator.alarms.cmd_send_clear_alarms() - # clear_all_alarms() - def test_valid_parameters(): hd_simulator = HDSimulator(log_level="DEBUG") @@ -114,6 +100,7 @@ ] hd_simulator.cmd_send_treatment_parameter_validation_response(rejections) + def test_invalid_parameters(): hd_simulator = HDSimulator(log_level="DEBUG") @@ -125,6 +112,7 @@ hd_simulator.cmd_send_treatment_parameter_manual_validation_response(rejections) sleep(2) + def test_priming(): hd_simulator = HDSimulator(log_level="DEBUG") state = 0 @@ -144,6 +132,7 @@ print(result) self.received_response = True + def test_start_confirm_end_treatment(): hd_simulator = HDSimulator(log_level="PRINT_ONLY") observer = StartTreatmentObserver() @@ -152,14 +141,9 @@ while not observer.received_response: sleep(0.50) + if __name__ == '__main__': - # sleep(1) - # test_poweroff() - # test_valid_parameters() - # test_priming() test_start_confirm_end_treatment() - # test_invalid_parameters() - # test_clear_alarms()