File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -182,16 +182,21 @@ def test_run_with_db(
182182 },
183183 )
184184
185- # Mock out module-level functions
185+ # Mock the ISPyB connection where the TransportManager class is located
186186 mock_security_config = MagicMock ()
187187 mock_security_config .ispyb_credentials = mock_ispyb_credentials
188188 mock_get_security_config = mocker .patch ("murfey.server.ispyb.get_security_config" )
189189 mock_get_security_config .return_value = mock_security_config
190190
191- # Mock the ISPyB connection
192191 mock_ispyb_sessionmaker = mocker .patch ("murfey.server.ispyb.sessionmaker" )
193192 mock_ispyb_sessionmaker .return_value .return_value = ispyb_db_session
194193
194+ # Mock the ISPYB connection when registering data collection group
195+ mocker .patch (
196+ "murfey.workflows.register_data_collection_group.ISPyBSession" ,
197+ return_value = ispyb_db_session ,
198+ )
199+
195200 # Mock out the machine config used in the helper sanitisation function
196201 mock_get_machine_config = mocker .patch ("murfey.workflows.clem.get_machine_config" )
197202 mock_machine_config = MagicMock ()
You can’t perform that action at this time.
0 commit comments