Skip to content

Commit 9df629d

Browse files
committed
mocked wrong way around
1 parent 04bdc27 commit 9df629d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/server/api/test_workflow.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def test_register_dc_group_new_dcg(mock_transport, murfey_db_session: Session):
4141
"atlas_pixel_size": 1e-5,
4242
"microscope": "",
4343
"proposal_code": ExampleVisit.proposal_code,
44-
"proposal_number": ExampleVisit.proposal_number,
45-
"visit_number": ExampleVisit.visit_number,
44+
"proposal_number": str(ExampleVisit.proposal_number),
45+
"visit_number": str(ExampleVisit.visit_number),
4646
},
4747
)
4848

@@ -203,10 +203,10 @@ def test_register_dc_group_new_atlas(mock_transport, murfey_db_session: Session)
203203
# Check the call to insert the atlas into ispyb
204204
atlas_args = mock_transport.do_insert_atlas.call_args_list
205205
assert len(atlas_args) == 1
206-
assert atlas_args[0].dataCollectionGroupId == 1
207-
assert atlas_args[0].atlasImage == "/path/to/Atlas_2.jpg"
208-
assert atlas_args[0].pixelSize == 1e-4
209-
assert atlas_args[0].cassetteSlot == 10
206+
assert atlas_args[0][0].dataCollectionGroupId == 1
207+
assert atlas_args[0][0].atlasImage == "/path/to/Atlas_2.jpg"
208+
assert atlas_args[0][0].pixelSize == 1e-4
209+
assert atlas_args[0][0].cassetteSlot == 10
210210

211211
# Check the data collection group atlas was updated
212212
new_dcg = murfey_db_session.exec(
@@ -219,8 +219,8 @@ def test_register_dc_group_new_atlas(mock_transport, murfey_db_session: Session)
219219
assert new_dcg.atlas_id == 5
220220

221221

222-
@mock.patch("murfey.server.api.workflow.register_search_map_in_database")
223222
@mock.patch("murfey.server.api.workflow._transport_object")
223+
@mock.patch("murfey.server.api.workflow.register_search_map_in_database")
224224
def test_register_dc_group_new_atlas_with_searchmaps(
225225
mock_register_search_map, mock_transport, murfey_db_session: Session
226226
):

0 commit comments

Comments
 (0)