Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
noemifrisina committed Dec 17, 2024
1 parent dd2463b commit acd37b2
Showing 1 changed file with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pytest
from dodal.devices.zebra import DISCONNECT, SOFT_IN3
from ophyd_async.testing import get_mock_put, set_mock_value
from tests.unit_tests.beamlines.i24.serial.conftest import TEST_LUT

from mx_bluesky.beamlines.i24.serial.extruder.i24ssx_Extruder_Collect_py3v2 import (
TTL_EIGER,
Expand All @@ -22,7 +23,7 @@


@pytest.fixture
def dummy_params():
def dummy_params(tmp_path):
params = {
"visit": "foo",
"directory": "bar",
Expand All @@ -33,12 +34,22 @@ def dummy_params():
"transmission": 1.0,
"num_images": 10,
"pump_status": False,
"collection_directory": str(tmp_path / "foo/bar"),
}
return ExtruderParameters(**params)
with (
patch(
"mx_bluesky.beamlines.i24.serial.parameters.experiment_parameters.Path.mkdir"
),
patch(
"mx_bluesky.beamlines.i24.serial.parameters.experiment_parameters.BEAM_CENTER_LUT_FILES",
new=TEST_LUT,
),
):
yield ExtruderParameters(**params)


@pytest.fixture
def dummy_params_pp():
def dummy_params_pp(tmp_path):
params_pp = {
"visit": "foo",
"directory": "bar",
Expand All @@ -51,8 +62,18 @@ def dummy_params_pp():
"pump_status": True,
"laser_dwell_s": 0.01,
"laser_delay_s": 0.005,
"collection_directory": str(tmp_path / "foo/bar"),
}
return ExtruderParameters(**params_pp)
with (
patch(
"mx_bluesky.beamlines.i24.serial.parameters.experiment_parameters.Path.mkdir"
),
patch(
"mx_bluesky.beamlines.i24.serial.parameters.experiment_parameters.BEAM_CENTER_LUT_FILES",
new=TEST_LUT,
),
):
yield ExtruderParameters(**params_pp)


@pytest.fixture
Expand Down

0 comments on commit acd37b2

Please sign in to comment.