Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
cgundy committed Dec 16, 2024
1 parent 08a5cde commit f440db9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion reusable_workflows/tests/test_compliance_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def test_get_repo_permissions():
repo_permissions.check(helper)

assert repo_permissions.succeeds is True
assert repo_permissions.message == "Team idx has write permissions."
assert repo_permissions.message == "Team idx has maintain permissions."

@pytest.mark.integration
def test_branch_protection():
Expand Down
9 changes: 9 additions & 0 deletions reusable_workflows/tests/test_membership.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
from unittest import mock

import github3
from github3.exceptions import NotFoundError
import pytest

Expand Down Expand Up @@ -129,3 +130,11 @@ def test_github_token_not_passed_in(github_login_mock):
assert (
str(exc.value) == "github login failed - maybe GH_TOKEN was not correctly set"
)

@pytest.mark.integration
def test_is_member_of_org():
gh = github3.login(token=os.getenv("GH_TOKEN"))

is_member = is_member_of_org(gh, "dfinity", "sa-github-api")

assert is_member is True

0 comments on commit f440db9

Please sign in to comment.