Skip to content

Commit 7ee5377

Browse files
committed
ISPyB DB session fixture attached to the MagicMock object incorrectly
1 parent 1d9bbc7 commit 7ee5377

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/workflows/clem/test_register_preprocessing_results.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def test_run_with_db(
189189
mock_get_security_config.return_value = mock_security_config
190190

191191
mock_ispyb_session_factory = MagicMock(return_value=ispyb_db_session)
192-
mock_ispyb_session_factory.return_value = ispyb_db_session
192+
mock_ispyb_session_factory.__enter__.return_value = ispyb_db_session
193193
# mock_ispyb_sessionmaker = mocker.patch(
194194
mocker.patch(
195195
"murfey.server.ispyb.sessionmaker", return_value=mock_ispyb_session_factory

0 commit comments

Comments
 (0)