action_utils.tests.test_get_team_approval_status module
Tests for the action_utils.get_team_approval_status module
- class action_utils.tests.test_get_team_approval_status.TestPRHasAppropriateReviews
Bases:
object
Tests for the pr_has_appropriate_reviews function
- test_authentication_fail(unauthenticated_client, test_org, test_repo, pull_all_teams_approved, all_teams)
End-to-end style test to assert proper handling of authentication failure
- test_false_changes_requested(authenticated_client, test_org, test_repo, pull_all_teams_requested_changes, all_teams)
End-to-end style test for when a PR has only change requests
- test_false_comments(authenticated_client, test_org, test_repo, pull_all_teams_commented, all_teams)
End-to-end style test for when a PR has only comments
- test_false_mixed(authenticated_client, test_org, test_repo, pull_qa_recent_approval_1, all_teams)
End-to-end style test for when a PR has some change requests and some approvals but meets overall approval
- test_invalid_pull(authenticated_client, test_org, test_repo, all_teams)
End-to-end style test to assert proper handling of invalid PR number
- test_invalid_repo(authenticated_client, test_org, pull_all_teams_approved, all_teams)
End-to-end style test to assert proper handling of invalid repo
- test_missing_teams(authenticated_client, test_org, test_repo, pull_all_teams_approved)
End-to-end style test to assert proper handling of invalid team name
- test_true_all(authenticated_client, test_org, test_repo, pull_all_teams_approved, all_teams)
End-to-end style test for when a PR has required team approvals
- test_true_mixed(authenticated_client, test_org, test_repo, pull_mixed_reviews, all_teams)
End-to-end style test for when a PR has some change requests and some approvals but meets overall approval
- class action_utils.tests.test_get_team_approval_status.TestTeamMemberHasApprovedPR
Bases:
object
Tests for the team_member_has_approved_pr function
- test_false_change_request(qa_team, pull_all_teams_requested_changes)
All teams have only requested changes, QA should not be marked as having approved
- test_false_comment(qa_team, pull_all_teams_commented)
All teams have only commented, QA should not be marked as having approved
- test_false_multiple_reviews_1(qa_team, pull_qa_recent_change_request_1)
QA previously approved, but the most recent review is a change request, should not be marked as approved
- test_false_multiple_reviews_2(qa_team, pull_qa_recent_change_request_2)
QA previously approved, but the most recent was a change request, should not be marked as approved
- test_true_all(qa_team, pull_all_teams_approved)
All teams have approved, so QA should be marked as having approved
- test_true_mixed_team(qa_team, pull_mixed_reviews)
Case where 1 QA team member has not approved but another has, QA should be marked as having approved
- test_true_multiple_reviews_1(qa_team, pull_qa_recent_approval_1)
QA previously requested changes, but the most recent review is an approval, should be marked as approved
- test_true_multiple_reviews_2(qa_team, pull_qa_recent_approval_2)
QA previously requested changes, but the most recent was an approval, should be marked as approved
- action_utils.tests.test_get_team_approval_status.fixture_all_teams(qa_team, devops_team, bioinformatics_team)
- action_utils.tests.test_get_team_approval_status.fixture_authenticated_client(test_org)
- action_utils.tests.test_get_team_approval_status.fixture_bioinformatics_approval(user_4)
- action_utils.tests.test_get_team_approval_status.fixture_bioinformatics_change_request(user_4)
- action_utils.tests.test_get_team_approval_status.fixture_bioinformatics_comment(user_4)
- action_utils.tests.test_get_team_approval_status.fixture_bioinformatics_team(user_4)
- action_utils.tests.test_get_team_approval_status.fixture_devops_approval(user_2)
- action_utils.tests.test_get_team_approval_status.fixture_devops_change_request(user_2)
- action_utils.tests.test_get_team_approval_status.fixture_devops_comment(user_2)
- action_utils.tests.test_get_team_approval_status.fixture_devops_team(user_2, user_3)
- action_utils.tests.test_get_team_approval_status.fixture_pull_all_teams_approved(qa_approval, devops_approval, bioinformatics_approval)
- action_utils.tests.test_get_team_approval_status.fixture_pull_all_teams_commented(qa_comment, devops_comment, bioinformatics_comment)
- action_utils.tests.test_get_team_approval_status.fixture_pull_all_teams_requested_changes(qa_change_request, devops_change_request, bioinformatics_change_request)
- action_utils.tests.test_get_team_approval_status.fixture_pull_mixed_reviews(qa_change_request, devops_approval, bioinformatics_approval)
- action_utils.tests.test_get_team_approval_status.fixture_pull_qa_recent_approval_1(qa_approval, qa_comment, qa_change_request)
- action_utils.tests.test_get_team_approval_status.fixture_pull_qa_recent_approval_2(qa_approval, qa_comment, qa_change_request)
- action_utils.tests.test_get_team_approval_status.fixture_pull_qa_recent_change_request_1(qa_approval, qa_comment, qa_change_request)
- action_utils.tests.test_get_team_approval_status.fixture_pull_qa_recent_change_request_2(qa_approval, qa_comment, qa_change_request)
- action_utils.tests.test_get_team_approval_status.fixture_qa_approval(user_1)
- action_utils.tests.test_get_team_approval_status.fixture_qa_change_request(user_1)
- action_utils.tests.test_get_team_approval_status.fixture_qa_comment(user_1)
- action_utils.tests.test_get_team_approval_status.fixture_qa_team(user_1, user_2, user_3)
- action_utils.tests.test_get_team_approval_status.fixture_test_org(all_teams, test_repo)
- action_utils.tests.test_get_team_approval_status.fixture_test_repo(pull_all_teams_approved, pull_all_teams_commented, pull_all_teams_requested_changes, pull_mixed_reviews, pull_qa_recent_approval_1, pull_qa_recent_approval_2, pull_qa_recent_change_request_1, pull_qa_recent_change_request_2)
- action_utils.tests.test_get_team_approval_status.fixture_unauthenticated_client(test_org)
- action_utils.tests.test_get_team_approval_status.fixture_user_1()
- action_utils.tests.test_get_team_approval_status.fixture_user_2()
- action_utils.tests.test_get_team_approval_status.fixture_user_3()
- action_utils.tests.test_get_team_approval_status.fixture_user_4()