Skip to content

Commit

Permalink
Merge pull request #4320 from nickmango/bug/unit-tests-label
Browse files Browse the repository at this point in the history
Bug/Label Unit Test
  • Loading branch information
nickmango authored May 9, 2024
2 parents 021ae2a + 3f8547c commit cdac1c2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion cla-backend/cla/models/github_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,6 @@ def update_pull_request(
github_repository_id,
pull_request,
repository_name,
organization_name,
signed: List[UserCommitSummary],
missing: List[UserCommitSummary],
project_version,
Expand Down
5 changes: 1 addition & 4 deletions cla-backend/cla/tests/unit/test_github_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ def test_update_pull_request_valid_labels(self, mock_github_installation, mock_u
installation_id = 123
github_repository_id = 456
pull_request = MagicMock()
repository_name = "test_repo"
organization_name = "test_org"
repository_name = "test_org/test_repo"
signed = [
UserCommitSummary(
author_id="1",
Expand Down Expand Up @@ -132,15 +131,13 @@ def test_update_pull_request_valid_labels(self, mock_github_installation, mock_u
github_repository_id,
pull_request,
repository_name,
organization_name,
signed,
missing,
project_version,
)

# Assertions
client_mock.add_labels_to_pr.assert_called_once_with(
organization_name,
repository_name,
pull_request.number,
["CLA: Valid"],
Expand Down

0 comments on commit cdac1c2

Please sign in to comment.