Skip to content

Commit

Permalink
#31 Fix test to be skipped without variables
Browse files Browse the repository at this point in the history
  • Loading branch information
roskakori committed Nov 21, 2024
1 parent a7ebc7a commit c92a7ad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_organization_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ def test_can_resolve_check_done_github_app_installation_id():
assert isinstance(fake_installation_id, int)


@pytest.mark.skipif(
not HAS_DEMO_CHECK_DONE_ORGANIZATION_PROJECT_CONFIGURED,
reason=REASON_SHOULD_HAVE_DEMO_CHECK_DONE_ORGANIZATION_PROJECT_CONFIGURED,
)
def test_fails_to_resolve_check_done_github_app_installation_id():
session = _session()
with pytest.raises(AuthenticationError, match="Could not retrieve installation ID: status=404 "):
Expand All @@ -105,6 +109,8 @@ def test_fails_to_resolve_access_token_from_check_done_github_app_installation_i


def _session():
assert DEMO_CHECK_DONE_GITHUB_APP_ID is not None
assert DEMO_CHECK_DONE_GITHUB_APP_PRIVATE_KEY is not None
jwt_token = generate_jwt_token(DEMO_CHECK_DONE_GITHUB_APP_ID, DEMO_CHECK_DONE_GITHUB_APP_PRIVATE_KEY)
session = requests.Session()
session.headers = {"Accept": "application/vnd.github+json"}
Expand Down

0 comments on commit c92a7ad

Please sign in to comment.