From 0c8e33ebddb3f0c3779b7345db9f49dc28beaf9c Mon Sep 17 00:00:00 2001 From: Noemi Frisina Date: Fri, 13 Sep 2024 15:51:17 +0100 Subject: [PATCH] Update test --- .../i24/serial/fixed_target/test_ft_collect.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/tests/unit_tests/beamlines/i24/serial/fixed_target/test_ft_collect.py b/tests/unit_tests/beamlines/i24/serial/fixed_target/test_ft_collect.py index 28c561477..b0bde74c1 100644 --- a/tests/unit_tests/beamlines/i24/serial/fixed_target/test_ft_collect.py +++ b/tests/unit_tests/beamlines/i24/serial/fixed_target/test_ft_collect.py @@ -209,18 +209,11 @@ def test_finish_i24( @patch("mx_bluesky.beamlines.i24.serial.fixed_target.i24ssx_Chip_Collect_py3v1.DCID") -@patch( - "mx_bluesky.beamlines.i24.serial.fixed_target.i24ssx_Chip_Collect_py3v1.bps.sleep" -) -def test_run_aborted_plan(mock_sleep, fake_dcid: MagicMock, pmac: PMAC, RE): +def test_run_aborted_plan(fake_dcid: MagicMock, pmac: PMAC, RE, done_status): + pmac.abort_program.trigger = MagicMock(return_value=done_status) RE(run_aborted_plan(pmac, fake_dcid)) - mock_pmac_string = get_mock_put(pmac.pmac_string) - pmac_string_calls = [ - call("A", wait=True, timeout=ANY), - call("P2401=0", wait=True, timeout=ANY), - ] - mock_pmac_string.assert_has_calls(pmac_string_calls) + pmac.abort_program.trigger.assert_called_once() fake_dcid.collection_complete.assert_called_once_with(ANY, aborted=True)