Skip to content

Commit 0ab6102

Browse files
committed
Improve tests
1 parent eac3702 commit 0ab6102

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

tests/workflows/tomo/test_tomo_picking.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_picked_tomogram_not_run_class2d(
4444
murfey_db_session,
4545
ProcessingJob,
4646
lookup_kwargs={
47-
"id": 0,
47+
"id": 1,
4848
"recipe": "test_recipe",
4949
"dc_id": dc_entry.id,
5050
},
@@ -111,7 +111,7 @@ def test_picked_tomogram_run_class2d(
111111
murfey_db_session,
112112
ProcessingJob,
113113
lookup_kwargs={
114-
"id": 0,
114+
"id": 1,
115115
"recipe": "test_recipe",
116116
"dc_id": dc_entry.id,
117117
},
@@ -137,6 +137,7 @@ def test_picked_tomogram_run_class2d(
137137
)
138138

139139
message = {
140+
"session_id": 11,
140141
"program_id": 0,
141142
"cbox_3d": f"{tmp_path}/AutoPick/job007/CBOX_3d/sample.cbox",
142143
"particle_count": 2,
@@ -168,4 +169,26 @@ def test_picked_tomogram_run_class2d(
168169
assert tomograms_db.particle_count == 2
169170
assert tomograms_db.pixel_size == 5.3
170171

171-
mock_transport.assert_called_once()
172+
mock_transport.send.assert_called_once_with(
173+
"processing_recipe",
174+
{
175+
"parameters": {
176+
"tomogram": message["tomogram"],
177+
"cbox_3d": message["cbox_3d"],
178+
"pixel_size": message["pixel_size"],
179+
"particle_diameter": 100,
180+
"kv": 300,
181+
"node_creator_queue": "node_creator",
182+
"session_id": message["session_id"],
183+
"autoproc_program_id": 0,
184+
"batch_size": 10000,
185+
"nr_classes": 10,
186+
"picker_id": None,
187+
"class2d_grp_uuid": 0,
188+
"class_uuids": {str(i): i for i in range(10)},
189+
"feedback_queue": "murfey_feedback",
190+
},
191+
"recipes": ["em-tomo-class2d"],
192+
},
193+
new_connection=True,
194+
)

0 commit comments

Comments
 (0)