From 67ddfb61200cd038a408d1c60b1d5d8c113b51d9 Mon Sep 17 00:00:00 2001 From: Tony Le Date: Fri, 6 Dec 2024 10:30:22 -0500 Subject: [PATCH] Fix tests and lints --- tests/helpers/test_upload_sender.py | 6 +- tests/services/upload/test_upload_service.py | 120 +++++++++---------- 2 files changed, 65 insertions(+), 61 deletions(-) diff --git a/tests/helpers/test_upload_sender.py b/tests/helpers/test_upload_sender.py index 1e164ef5..ff24329d 100644 --- a/tests/helpers/test_upload_sender.py +++ b/tests/helpers/test_upload_sender.py @@ -215,7 +215,11 @@ def test_upload_sender_post_called_with_right_parameters_and_upload_coverage( headers = {"Authorization": f"token {random_token}"} sending_result = UploadSender().send_upload_data( - upload_collection, random_sha, random_token, upload_coverage=True, **named_upload_data + upload_collection, + random_sha, + random_token, + upload_coverage=True, + **named_upload_data, ) assert sending_result.error is None assert sending_result.warnings == [] diff --git a/tests/services/upload/test_upload_service.py b/tests/services/upload/test_upload_service.py index 2cf216d1..1ce1e677 100644 --- a/tests/services/upload/test_upload_service.py +++ b/tests/services/upload/test_upload_service.py @@ -107,26 +107,26 @@ def test_do_upload_logic_happy_path_legacy_uploader(mocker): ) mock_generate_upload_data.assert_called_with("coverage") mock_send_upload_data.assert_called_with( - mock_generate_upload_data.return_value, - "commit_sha", - "token", - None, - "report_code", - "coverage", - "name", - "branch", - "slug", - "pr", - "build_code", - "build_url", - "job_code", - None, - "service", - "git_service", - None, - None, - False, - None, + upload_data=mock_generate_upload_data.return_value, + commit_sha="commit_sha", + token="token", + env_vars=None, + report_code="report_code", + upload_file_type="coverage", + name="name", + branch="branch", + slug="slug", + pull_request_number="pr", + build_code="build_code", + build_url="build_url", + job_code="job_code", + flags=None, + ci_service="service", + git_service="git_service", + enterprise_url=None, + parent_sha=None, + upload_coverage=False, + args=None, ) @@ -219,26 +219,26 @@ def test_do_upload_logic_happy_path(mocker): ) mock_generate_upload_data.assert_called_with("coverage") mock_send_upload_data.assert_called_with( - mock_generate_upload_data.return_value, - "commit_sha", - "token", - None, - "report_code", - "coverage", - "name", - "branch", - "slug", - "pr", - "build_code", - "build_url", - "job_code", - None, - "service", - "git_service", - None, - None, - False, - None, + upload_data=mock_generate_upload_data.return_value, + commit_sha="commit_sha", + token="token", + env_vars=None, + report_code="report_code", + upload_file_type="coverage", + name="name", + branch="branch", + slug="slug", + pull_request_number="pr", + build_code="build_code", + build_url="build_url", + job_code="job_code", + flags=None, + ci_service="service", + git_service="git_service", + enterprise_url=None, + parent_sha=None, + upload_coverage=False, + args=None, ) @@ -671,24 +671,24 @@ def test_do_upload_logic_happy_path_test_results(mocker): ) mock_generate_upload_data.assert_called_with("test_results") mock_send_upload_data.assert_called_with( - mock_generate_upload_data.return_value, - "commit_sha", - "token", - None, - "report_code", - "test_results", - "name", - "branch", - "slug", - "pr", - "build_code", - "build_url", - "job_code", - None, - "service", - "git_service", - None, - None, - False, - {"args": "fake_args"}, + upload_data=mock_generate_upload_data.return_value, + commit_sha="commit_sha", + token="token", + env_vars=None, + report_code="report_code", + upload_file_type="test_results", + name="name", + branch="branch", + slug="slug", + pull_request_number="pr", + build_code="build_code", + build_url="build_url", + job_code="job_code", + flags=None, + ci_service="service", + git_service="git_service", + enterprise_url=None, + parent_sha=None, + upload_coverage=False, + args={"args": "fake_args"}, )