def test_download_exact_repo_invalid_repo(self): # does not contain the slash required for owner/repo format repo = "example" with requests_mock.mock() as mocker: mocker.get("https://api.github.com/repos/{}".format(repo), status_code=404) with pytest.raises(Exception) as exc_info: with patch.dict('os.environ', {"GITHUB_API_TOKEN": "key123"}): gitdl.download_exact_repo(repo) assert str(exc_info.value) == "Repository Not Found."
def test_download_exact_repo_invalid_repo(self): # does not contain the slash required for owner/repo format repo = "example" with pytest.raises(Exception) as exc_info: gitdl.download_exact_repo(repo) assert str(exc_info.value) == "Repository Not Found."