File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -72,12 +72,7 @@ def test_get_all_ongoing_visits():
7272
7373
7474@mock .patch ("workflows.transport.pika_transport.PikaTransport" )
75- @mock .patch ("murfey.server.ispyb.ISPyBSession.__call__" )
76- def test_update_data_collection_group (
77- mock_ispyb_session_call , mock_transport , ispyb_db_session : Session
78- ):
79- mock_ispyb_session_call .return_value = ispyb_db_session
80-
75+ def test_update_data_collection_group (mock_transport , ispyb_db_session : Session ):
8176 # Manually get the BLSession ID for comparison
8277 bl_session_id = (
8378 ispyb_db_session .execute (
@@ -104,9 +99,10 @@ def test_update_data_collection_group(
10499 )
105100
106101 transport_manager = TransportManager ("PikaTransport" )
107- transport_manager .do_update_data_collection_group (
108- record = DataCollectionGroup (dataCollectionGroupId = 1 , experimentTypeId = 2 )
109- )
102+ with mock .patch ("murfey.server.ispyb.ISPyBSession" , ispyb_db_session ):
103+ transport_manager .do_update_data_collection_group (
104+ record = DataCollectionGroup (dataCollectionGroupId = 1 , experimentTypeId = 2 )
105+ )
110106
111107 final_dcg_entry = get_or_create_db_entry (
112108 session = ispyb_db_session ,
You can’t perform that action at this time.
0 commit comments