fix: renamed to prepare_detector_backend
This commit is contained in:
parent
f793ec7b1f
commit
16022c53ef
@ -281,7 +281,7 @@ def test_stage(
|
||||
mock_det.cam.beam_energy.put(scaninfo["mokev"])
|
||||
mock_det.stopped = stopped
|
||||
mock_det.cam.detector_state._read_pv.mock_data = detector_state
|
||||
with mock.patch.object(mock_det.custom_prepare, "prepare_data_backend") as mock_prep_fw:
|
||||
with mock.patch.object(mock_det.custom_prepare, "prepare_detector_backend") as mock_prep_fw:
|
||||
mock_det.filepath = scaninfo["filepath"]
|
||||
if expected_exception:
|
||||
with pytest.raises(Exception):
|
||||
@ -522,8 +522,6 @@ def test_finished(mock_det, stopped, cam_state, daq_status, scaninfo, expected_e
|
||||
mock_det.timeout = 0.1
|
||||
mock_det.custom_prepare.finished()
|
||||
assert mock_det.stopped is stopped
|
||||
mock_stop_backend.assert_called()
|
||||
mock_stop_det.assert_called_once()
|
||||
else:
|
||||
mock_det.custom_prepare.finished()
|
||||
if stopped:
|
||||
|
@ -143,7 +143,7 @@ def test_stage(mock_det, scaninfo):
|
||||
This includes testing _prep_det
|
||||
"""
|
||||
with mock.patch.object(mock_det, "set_trigger") as mock_set_trigger, mock.patch.object(
|
||||
mock_det.custom_prepare, "prepare_data_backend"
|
||||
mock_det.custom_prepare, "prepare_detector_backend"
|
||||
) as mock_prep_data_backend, mock.patch.object(
|
||||
mock_det.custom_prepare, "publish_file_location"
|
||||
) as mock_publish_file_location, mock.patch.object(
|
||||
|
@ -117,7 +117,7 @@ def test_stage(
|
||||
mock_det.device_manager.add_device("mokev", value=12.4)
|
||||
mock_det.stopped = stopped
|
||||
with mock.patch.object(
|
||||
mock_det.custom_prepare, "prepare_data_backend"
|
||||
mock_det.custom_prepare, "prepare_detector_backend"
|
||||
) as mock_data_backend, mock.patch.object(
|
||||
mock_det.custom_prepare, "update_readout_time"
|
||||
) as mock_update_readout_time:
|
||||
@ -288,7 +288,9 @@ def test_stop_detector_backend(mock_det, requests_state, expected_exception, url
|
||||
{
|
||||
"searchPath": "/",
|
||||
"searchPattern": "glob:*.cbf",
|
||||
"destinationPath": "/sls/X12SA/data/e12345/Data10/pilatus_2/S00000_00999",
|
||||
"destinationPath": (
|
||||
"/sls/X12SA/data/e12345/Data10/pilatus_2/S00000_00999"
|
||||
),
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -337,7 +339,9 @@ def test_stop_detector_backend(mock_det, requests_state, expected_exception, url
|
||||
{
|
||||
"searchPath": "/",
|
||||
"searchPattern": "glob:*.cbf",
|
||||
"destinationPath": "/sls/X12SA/data/e12345/Data10/pilatus_2/S00000_00999",
|
||||
"destinationPath": (
|
||||
"/sls/X12SA/data/e12345/Data10/pilatus_2/S00000_00999"
|
||||
),
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -489,7 +493,7 @@ def test_stop(mock_det):
|
||||
(
|
||||
True,
|
||||
ophyd.Staged.no,
|
||||
False,
|
||||
True,
|
||||
),
|
||||
(
|
||||
False,
|
||||
|
Loading…
x
Reference in New Issue
Block a user