Skip to content

Commit 3e58339

Browse files
committed
Fix test_process_on_finished_run
1 parent e8c49c1 commit 3e58339

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/analysis/test_analysis_element.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,14 @@ def test_process_on_finished_run(aviti_fixture):
154154
# Sub-mock configuration
155155
mocks["mock_db"].return_value.check_db_run_status.return_value = "ongoing"
156156
mocks["mock_db"].return_value.upload_to_statusdb.return_value = None
157+
# set mocks["mock_mail"] to mock taca.element.Element_Runs.send_mail instead
158+
# of taca.analysis.analysis_element.send_mail
159+
mocks["mock_mail"].stop()
160+
mocks["mock_mail"] = patch("taca.element.Element_Runs.send_mail").start()
161+
patch(
162+
"taca.element.Element_Runs.CONFIG",
163+
new={**get_config(tmp), "mail": {"recipients": ["<EMAIL>"]}},
164+
).start()
157165

158166
# Add metadata files
159167
run_dir = create_element_run_dir(

0 commit comments

Comments
 (0)