Index: tests/peter/test_POST.py =================================================================== diff -u -r33ca5c4128dec6677a0c8bd8e69e439521f6120a -rb31694e714c45e0678632ab11efbcdcf6dbf6e96 --- tests/peter/test_POST.py (.../test_POST.py) (revision 33ca5c4128dec6677a0c8bd8e69e439521f6120a) +++ tests/peter/test_POST.py (.../test_POST.py) (revision b31694e714c45e0678632ab11efbcdcf6dbf6e96) @@ -18,24 +18,22 @@ sys.path.append("../../") from dialin import HDSimulator, DGSimulator from time import sleep +from dialin.common import HDOpModes, HDOpSubModes SUCCESS = 1 FAILURE = 0 NUM_HD_TESTS = 8 NUM_DG_TESTS = 6 -hd_sim = HDSimulator(log_level="DEBUG") -dg_sim = DGSimulator(log_level="DEBUG") +hd_sim = HDSimulator() +dg_sim = DGSimulator() -for test_num in range(NUM_HD_TESTS-1): - hd_sim.cmd_send_hd_post_single_result(SUCCESS, test_num=test_num) - sleep(1) -hd_sim.cmd_send_hd_post_single_result(FAILURE, test_num=7) -hd_sim.cmd_send_hd_post_final_result(FAILURE) +for _ in range(40): + hd_sim.cmd_set_hd_operation_mode_data(HDOpModes.MODE_INIT.value, HDOpSubModes.SUBMODE_START.value) + sleep(0.25) -for test_num in range(NUM_DG_TESTS-1): - dg_sim.cmd_send_dg_post_single_result(SUCCESS, test_num=test_num) - sleep(1) -dg_sim.cmd_send_dg_post_single_result(FAILURE, test_num=5) -dg_sim.cmd_send_dg_post_final_result(FAILURE) +dg_sim.cmd_send_dg_post_final_result(SUCCESS) +hd_sim.cmd_send_hd_post_final_result(SUCCESS) +sleep(2) +hd_sim.cmd_set_hd_operation_mode_data(HDOpModes.MODE_STAN.value, HDOpSubModes.SUBMODE_START.value)