Skip to content

Commit 8478ec3

Browse files
committed
Needs to keep adding
1 parent 5e22677 commit 8478ec3

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tests/workflows/tomo/test_tomo_picking.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
from tests.conftest import ExampleVisit, get_or_create_db_entry
1515

1616

17+
@mock.patch("murfey.workflows.tomo.picking._transport_object")
1718
@mock.patch("murfey.workflows.tomo.picking._pj_id_tomo_classification")
1819
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
2021
):
2122
"""Run the picker feedback with less particles than needed for classification"""
2223
mock_pjid.return_value = 1
@@ -79,6 +80,8 @@ def test_picked_tomogram_not_run_class2d(
7980
assert added_picks[0].particle_size == 10.1
8081
assert added_picks[1].particle_size == 20.2
8182

83+
mock_transport.send.assert_not_called()
84+
8285

8386
@mock.patch("murfey.workflows.tomo.picking._transport_object")
8487
@mock.patch("murfey.workflows.tomo.picking._pj_id_tomo_classification")
@@ -133,7 +136,11 @@ def test_picked_tomogram_run_class2d(
133136
get_or_create_db_entry(
134137
murfey_db_session,
135138
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+
},
137144
)
138145

139146
message = {
@@ -176,7 +183,7 @@ def test_picked_tomogram_run_class2d(
176183
"tomogram": message["tomogram"],
177184
"cbox_3d": message["cbox_3d"],
178185
"pixel_size": message["pixel_size"],
179-
"particle_diameter": 100,
186+
"particle_diameter": 200,
180187
"kv": 300,
181188
"node_creator_queue": "node_creator",
182189
"session_id": message["session_id"],

0 commit comments

Comments
 (0)