Skip to content

Commit 6fbb9cb

Browse files
committed
Another small fix
1 parent f384d1a commit 6fbb9cb

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

tests/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
from pyosmeta.parse_issues import ProcessIssues
55

66

7+
@pytest.fixture
8+
def github_api():
9+
return GitHubAPI(
10+
org="pyopensci", repo="pyosmeta", labels=["label1", "label2"]
11+
)
12+
13+
714
@pytest.fixture
815
def process_issues():
916
"""A fixture that returns an instance of the ProcessIssues class"""

tests/unit/test_github_api.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,14 @@ def test_missing_token(mock_missing_github_token, tmpdir):
4040

4141
with pytest.raises(KeyError, match="Oops! A GITHUB_TOKEN environment"):
4242
github_api.get_token()
43+
44+
45+
def test_api_endpoint(github_api):
46+
"""Test that the generated api url created in the property
47+
is as expected
48+
"""
49+
expected_endpoint = (
50+
"https://api.github.com/repos/pyopensci/pyosmeta/"
51+
"issues?labels=label1,label2&state=all&per_page=100"
52+
)
53+
assert github_api.api_endpoint == expected_endpoint

0 commit comments

Comments
 (0)