Skip to content

Commit f384d1a

Browse files
committed
Fix: test will this run in ci?
1 parent 22ac7db commit f384d1a

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

tests/unit/test_github_api.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,10 @@ def test_get_token(mock_github_token):
3333
assert token == os.environ["GITHUB_TOKEN"]
3434

3535

36-
# This test should work but it keeps finding my local envt var
37-
# Even tho i'm removing it in the monkey patch and using a temp
38-
# Directory
39-
# def test_missing_token(mock_missing_github_token, tmpdir):
40-
# """Test that a keyerror is raised when the token is missing."""
41-
# os.chdir(tmpdir)
42-
# github_api = GitHubAPI()
43-
44-
# with pytest.raises(KeyError, match="Oops! A GITHUB_TOKEN environment"):
45-
# github_api.get_token()
36+
def test_missing_token(mock_missing_github_token, tmpdir):
37+
"""Test that a keyerror is raised when the token is missing."""
38+
os.chdir(tmpdir)
39+
github_api = GitHubAPI()
40+
41+
with pytest.raises(KeyError, match="Oops! A GITHUB_TOKEN environment"):
42+
github_api.get_token()

0 commit comments

Comments
 (0)