diff --git a/tasks/tests/unit/test_test_results_finisher.py b/tasks/tests/unit/test_test_results_finisher.py index c8508c6f1..66ca47dc4 100644 --- a/tasks/tests/unit/test_test_results_finisher.py +++ b/tasks/tests/unit/test_test_results_finisher.py @@ -11,7 +11,7 @@ from database.tests.factories import CommitFactory, PullFactory, UploadFactory from services.repository import EnrichedPull from services.test_results import generate_test_id -from tasks.test_results_finisher import TestResultsFinisherTask +from tasks.test_results_finisher import QUEUE_NOTIFY_KEY, TestResultsFinisherTask here = Path(__file__) @@ -219,7 +219,11 @@ def test_upload_finisher_task_call( commit_yaml={"codecov": {"max_report_age": False}}, ) - expected_result = {"notify_attempted": True, "notify_succeeded": True} + expected_result = { + "notify_attempted": True, + "notify_succeeded": True, + QUEUE_NOTIFY_KEY: False, + } assert expected_result == result mock_repo_provider_comments.post_comment.assert_called_with( @@ -277,7 +281,11 @@ def test_upload_finisher_task_call_no_failures( commit_yaml={"codecov": {"max_report_age": False}}, ) - expected_result = {"notify_attempted": False, "notify_succeeded": False} + expected_result = { + "notify_attempted": False, + "notify_succeeded": False, + QUEUE_NOTIFY_KEY: True, + } test_results_mock_app.tasks[ "app.tasks.notify.Notify" ].apply_async.assert_called_with( @@ -335,7 +343,11 @@ def test_upload_finisher_task_call_no_success( commit_yaml={"codecov": {"max_report_age": False}}, ) - expected_result = {"notify_attempted": False, "notify_succeeded": False} + expected_result = { + "notify_attempted": False, + "notify_succeeded": False, + QUEUE_NOTIFY_KEY: False, + } assert expected_result == result @@ -379,7 +391,11 @@ def test_upload_finisher_task_call_existing_comment( commit_yaml={"codecov": {"max_report_age": False}}, ) - expected_result = {"notify_attempted": True, "notify_succeeded": True} + expected_result = { + "notify_attempted": True, + "notify_succeeded": True, + QUEUE_NOTIFY_KEY: False, + } mock_repo_provider_comments.edit_comment.assert_called_with( pull.pullid, @@ -418,7 +434,11 @@ def test_upload_finisher_task_call_comment_fails( commit_yaml={"codecov": {"max_report_age": False}}, ) - expected_result = {"notify_attempted": True, "notify_succeeded": False} + expected_result = { + "notify_attempted": True, + "notify_succeeded": False, + QUEUE_NOTIFY_KEY: False, + } assert expected_result == result