From 7ad7b8f621420a652d44a8f8bc6ce13d1451c835 Mon Sep 17 00:00:00 2001 From: Dominic Oram Date: Fri, 8 Mar 2024 17:35:33 +0000 Subject: [PATCH] (#1242) Fix tests --- .../experiment_plans/test_flyscan_xray_centre_plan.py | 4 +++- .../experiment_plans/test_panda_flyscan_xray_centre_plan.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/unit_tests/experiment_plans/test_flyscan_xray_centre_plan.py b/tests/unit_tests/experiment_plans/test_flyscan_xray_centre_plan.py index cd1e0352c..eeba9a102 100644 --- a/tests/unit_tests/experiment_plans/test_flyscan_xray_centre_plan.py +++ b/tests/unit_tests/experiment_plans/test_flyscan_xray_centre_plan.py @@ -242,7 +242,8 @@ def test_read_hardware_for_ispyb_updates_from_ophyd_devices( assert hyperion_params.ispyb_params.sample_barcode == "BARCODE" @patch( - "dodal.devices.aperturescatterguard.ApertureScatterguard._safe_move_within_datacollection_range" + "dodal.devices.aperturescatterguard.ApertureScatterguard._safe_move_within_datacollection_range", + return_value=Status(done=True, success=True), ) @patch( "hyperion.experiment_plans.flyscan_xray_centre_plan.run_gridscan", autospec=True @@ -348,6 +349,7 @@ def test_results_passed_to_move_motors( @patch( "dodal.devices.aperturescatterguard.ApertureScatterguard._safe_move_within_datacollection_range", + return_value=Status(done=True, success=True), ) @patch( "hyperion.experiment_plans.flyscan_xray_centre_plan.run_gridscan", autospec=True diff --git a/tests/unit_tests/experiment_plans/test_panda_flyscan_xray_centre_plan.py b/tests/unit_tests/experiment_plans/test_panda_flyscan_xray_centre_plan.py index 593f24a83..85dbcb1ef 100644 --- a/tests/unit_tests/experiment_plans/test_panda_flyscan_xray_centre_plan.py +++ b/tests/unit_tests/experiment_plans/test_panda_flyscan_xray_centre_plan.py @@ -198,7 +198,8 @@ def test_read_hardware_for_ispyb_updates_from_ophyd_devices( assert params.hyperion_params.ispyb_params.sample_barcode == "BARCODE" @patch( - "dodal.devices.aperturescatterguard.ApertureScatterguard._safe_move_within_datacollection_range" + "dodal.devices.aperturescatterguard.ApertureScatterguard._safe_move_within_datacollection_range", + return_value=Status(done=True, success=True), ) @patch( "hyperion.experiment_plans.panda_flyscan_xray_centre_plan.run_gridscan", @@ -318,6 +319,7 @@ def test_results_passed_to_move_motors( @patch( "dodal.devices.aperturescatterguard.ApertureScatterguard._safe_move_within_datacollection_range", + return_value=Status(done=True, success=True), ) @patch( "hyperion.experiment_plans.panda_flyscan_xray_centre_plan.run_gridscan",