Skip to content

Commit 42796fc

Browse files
committed
Update tests
1 parent dfaf444 commit 42796fc

2 files changed

Lines changed: 24 additions & 4 deletions

File tree

tests/client/contexts/test_sxt.py

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ def test_sxt_context_txrm(mock_ole_file, mock_post, tmp_path):
6969
visit="cm12345-6",
7070
murfey_session=1,
7171
)
72-
context = SXTContext("zeiss", tmp_path / "cm12345-6/grid1", {}, "")
72+
context = SXTContext(
73+
"zeiss",
74+
tmp_path / "cm12345-6/grid1",
75+
{"recipes": {"aretomo": "sxt-aretomo"}},
76+
"",
77+
)
7378
context.post_transfer(
7479
tmp_path / "cm12345-6/grid1/example.txrm",
7580
required_position_files=[],
@@ -191,7 +196,12 @@ def test_sxt_context_txrm_external_ref(mock_ole_file, mock_post, tmp_path):
191196
visit="cm12345-6",
192197
murfey_session=1,
193198
)
194-
context = SXTContext("zeiss", tmp_path / "cm12345-6/grid1", {}, "")
199+
context = SXTContext(
200+
"zeiss",
201+
tmp_path / "cm12345-6/grid1",
202+
{"recipes": {"aretomo": "sxt-aretomo", "imod": "sxt-imod-patch-wbp"}},
203+
"",
204+
)
195205
context.post_transfer(
196206
tmp_path / "cm12345-6/grid1/example_-60to60@0.5.txrm",
197207
required_position_files=[],
@@ -204,7 +214,7 @@ def test_sxt_context_txrm_external_ref(mock_ole_file, mock_post, tmp_path):
204214
)
205215
mock_ole_file.assert_any_call(str(tmp_path / "cm12345-6/grid1/ref.xrm"))
206216

207-
assert mock_post.call_count == 5
217+
assert mock_post.call_count == 6
208218
mock_post.assert_any_call(
209219
"http://localhost:8000/workflow/visits/cm12345-6/sessions/1/register_data_collection_group",
210220
json={
@@ -245,6 +255,16 @@ def test_sxt_context_txrm_external_ref(mock_ole_file, mock_post, tmp_path):
245255
},
246256
headers={"Authorization": "Bearer "},
247257
)
258+
mock_post.assert_any_call(
259+
"http://localhost:8000/workflow/visits/cm12345-6/sessions/1/register_processing_job",
260+
json={
261+
"tag": "example",
262+
"source": f"{tmp_path}/cm12345-6/grid1",
263+
"recipe": "sxt-imod-patch-wbp",
264+
"experiment_type": "sxt",
265+
},
266+
headers={"Authorization": "Bearer "},
267+
)
248268
mock_post.assert_any_call(
249269
"http://localhost:8000/workflow/sxt/visits/cm12345-6/sessions/1/sxt_tilt_series",
250270
json={

tests/workflows/sxt/test_process_sxt_tilt_series.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def test_process_new_sxt_tilt_series(
7272
)
7373

7474
# Run the registration
75-
process_sxt_tilt_series.process_sxt_tilt_series_workflow(
75+
process_sxt_tilt_series.process_sxt_tilt_series(
7676
"cm12345-6",
7777
ExampleVisit.murfey_session_id,
7878
new_parameters,

0 commit comments

Comments
 (0)