File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff 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 ()
You can’t perform that action at this time.
0 commit comments