File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -188,8 +188,12 @@ def test_run_with_db(
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_ispyb_sessionmaker = mocker .patch ("murfey.server.ispyb.sessionmaker" )
192- mock_ispyb_sessionmaker .return_value .return_value = ispyb_db_session
191+ mock_ispyb_session_factory = MagicMock (return_value = ispyb_db_session )
192+ mock_ispyb_session_factory .return_value = ispyb_db_session
193+ # mock_ispyb_sessionmaker = mocker.patch(
194+ mocker .patch (
195+ "murfey.server.ispyb.sessionmaker" , return_value = mock_ispyb_session_factory
196+ )
193197
194198 # Mock the ISPYB connection when registering data collection group
195199 mocker .patch (
You can’t perform that action at this time.
0 commit comments