From 089c9a0e9fe0bab31c89ed5bdf174ac7a3a557e0 Mon Sep 17 00:00:00 2001 From: Robert Tuck Date: Mon, 13 Jan 2025 12:30:54 +0000 Subject: [PATCH] Convert flux to device_factory --- src/mx_bluesky/hyperion/utils/validation.py | 2 +- tests/conftest.py | 4 ++-- tests/system_tests/hyperion/experiment_plans/test_fgs_plan.py | 2 +- .../hyperion/experiment_plans/test_plan_system.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mx_bluesky/hyperion/utils/validation.py b/src/mx_bluesky/hyperion/utils/validation.py index 90bc0a8fa..1f2227a99 100644 --- a/src/mx_bluesky/hyperion/utils/validation.py +++ b/src/mx_bluesky/hyperion/utils/validation.py @@ -86,7 +86,7 @@ def fake_create_rotation_devices(): detector_motion = i03.detector_motion(connect_immediately=True, mock=True) backlight = i03.backlight(mock=True) attenuator = i03.attenuator(connect_immediately=True, mock=True) - flux = i03.flux(fake_with_ophyd_sim=True) + flux = i03.flux(connect_immediately=True, mock=True) undulator = i03.undulator(connect_immediately=True, mock=True) aperture_scatterguard = i03.aperture_scatterguard( connect_immediately=True, mock=True diff --git a/tests/conftest.py b/tests/conftest.py index 03cce5903..5356de234 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -406,7 +406,7 @@ def oav(test_config_files, RE): @pytest.fixture def flux(): - return i03.flux(fake_with_ophyd_sim=True) + return i03.flux(connect_immediately=True, mock=True) @pytest.fixture @@ -815,7 +815,7 @@ async def fake_fgs_composite( zebra_fast_grid_scan=i03.zebra_fast_grid_scan( connect_immediately=True, mock=True ), - flux=i03.flux(fake_with_ophyd_sim=True), + flux=i03.flux(connect_immediately=True, mock=True), s4_slit_gaps=s4_slit_gaps, smargon=smargon, undulator=i03.undulator(connect_immediately=True, mock=True), diff --git a/tests/system_tests/hyperion/experiment_plans/test_fgs_plan.py b/tests/system_tests/hyperion/experiment_plans/test_fgs_plan.py index 1551a7a87..892ea6df0 100644 --- a/tests/system_tests/hyperion/experiment_plans/test_fgs_plan.py +++ b/tests/system_tests/hyperion/experiment_plans/test_fgs_plan.py @@ -83,7 +83,7 @@ async def fxc_composite(): dcm=i03.dcm(fake_with_ophyd_sim=True), eiger=i03.eiger(), zebra_fast_grid_scan=i03.zebra_fast_grid_scan(), - flux=i03.flux(fake_with_ophyd_sim=True), + flux=i03.flux(connect_immediately=True, mock=True), robot=i03.robot(connect_immediately=True, mock=True), panda=i03.panda(connect_immediately=True, mock=True), panda_fast_grid_scan=i03.panda_fast_grid_scan( diff --git a/tests/system_tests/hyperion/experiment_plans/test_plan_system.py b/tests/system_tests/hyperion/experiment_plans/test_plan_system.py index e7148da32..5ff9c01a2 100644 --- a/tests/system_tests/hyperion/experiment_plans/test_plan_system.py +++ b/tests/system_tests/hyperion/experiment_plans/test_plan_system.py @@ -32,7 +32,7 @@ async def test_getting_data_for_ispyb(): synchrotron = i03.synchrotron(connect_immediately=True, mock=True) slit_gaps = S4SlitGaps(f"{CONST.SIM.BEAMLINE}-AL-SLITS-04:", name="slits") attenuator = i03.attenuator(connect_immediately=True, mock=True) - flux = i03.flux(fake_with_ophyd_sim=True) + flux = i03.flux(connect_immediately=True, mock=True) dcm = i03.dcm(fake_with_ophyd_sim=True) aperture_scatterguard = ApertureScatterguard( prefix="BL03S",