|
14 | 14 | from tests.conftest import ExampleVisit, get_or_create_db_entry |
15 | 15 |
|
16 | 16 |
|
| 17 | +@mock.patch("murfey.workflows.tomo.picking._transport_object") |
17 | 18 | @mock.patch("murfey.workflows.tomo.picking._pj_id_tomo_classification") |
18 | 19 | def test_picked_tomogram_not_run_class2d( |
19 | | - mock_pjid, murfey_db_session: Session, tmp_path |
| 20 | + mock_pjid, mock_transport, murfey_db_session: Session, tmp_path |
20 | 21 | ): |
21 | 22 | """Run the picker feedback with less particles than needed for classification""" |
22 | 23 | mock_pjid.return_value = 1 |
@@ -79,6 +80,8 @@ def test_picked_tomogram_not_run_class2d( |
79 | 80 | assert added_picks[0].particle_size == 10.1 |
80 | 81 | assert added_picks[1].particle_size == 20.2 |
81 | 82 |
|
| 83 | + mock_transport.send.assert_not_called() |
| 84 | + |
82 | 85 |
|
83 | 86 | @mock.patch("murfey.workflows.tomo.picking._transport_object") |
84 | 87 | @mock.patch("murfey.workflows.tomo.picking._pj_id_tomo_classification") |
@@ -133,7 +136,11 @@ def test_picked_tomogram_run_class2d( |
133 | 136 | get_or_create_db_entry( |
134 | 137 | murfey_db_session, |
135 | 138 | ParticleSizes, |
136 | | - lookup_kwargs={"pj_id": processing_job_entry.id, "particle_size": 100}, |
| 139 | + lookup_kwargs={ |
| 140 | + "id": particle, |
| 141 | + "pj_id": processing_job_entry.id, |
| 142 | + "particle_size": 100, |
| 143 | + }, |
137 | 144 | ) |
138 | 145 |
|
139 | 146 | message = { |
@@ -176,7 +183,7 @@ def test_picked_tomogram_run_class2d( |
176 | 183 | "tomogram": message["tomogram"], |
177 | 184 | "cbox_3d": message["cbox_3d"], |
178 | 185 | "pixel_size": message["pixel_size"], |
179 | | - "particle_diameter": 100, |
| 186 | + "particle_diameter": 200, |
180 | 187 | "kv": 300, |
181 | 188 | "node_creator_queue": "node_creator", |
182 | 189 | "session_id": message["session_id"], |
|
0 commit comments