Skip to content

Commit

Permalink
Fix tests and lints
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-codecov committed Dec 6, 2024
1 parent 222de6a commit 67ddfb6
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 61 deletions.
6 changes: 5 additions & 1 deletion tests/helpers/test_upload_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 == []
Expand Down
120 changes: 60 additions & 60 deletions tests/services/upload/test_upload_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)


Expand Down Expand Up @@ -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,
)


Expand Down Expand Up @@ -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"},
)

0 comments on commit 67ddfb6

Please sign in to comment.