Skip to content

Commit c92a7ad

Browse files
committed
#31 Fix test to be skipped without variables
1 parent a7ebc7a commit c92a7ad

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_organization_authentication.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ def test_can_resolve_check_done_github_app_installation_id():
7979
assert isinstance(fake_installation_id, int)
8080

8181

82+
@pytest.mark.skipif(
83+
not HAS_DEMO_CHECK_DONE_ORGANIZATION_PROJECT_CONFIGURED,
84+
reason=REASON_SHOULD_HAVE_DEMO_CHECK_DONE_ORGANIZATION_PROJECT_CONFIGURED,
85+
)
8286
def test_fails_to_resolve_check_done_github_app_installation_id():
8387
session = _session()
8488
with pytest.raises(AuthenticationError, match="Could not retrieve installation ID: status=404 "):
@@ -105,6 +109,8 @@ def test_fails_to_resolve_access_token_from_check_done_github_app_installation_i
105109

106110

107111
def _session():
112+
assert DEMO_CHECK_DONE_GITHUB_APP_ID is not None
113+
assert DEMO_CHECK_DONE_GITHUB_APP_PRIVATE_KEY is not None
108114
jwt_token = generate_jwt_token(DEMO_CHECK_DONE_GITHUB_APP_ID, DEMO_CHECK_DONE_GITHUB_APP_PRIVATE_KEY)
109115
session = requests.Session()
110116
session.headers = {"Accept": "application/vnd.github+json"}

0 commit comments

Comments
 (0)