Record unit and integration tests for Issue#pull_requests · lazymike/github3.py@fe8a5e3 · GitHub
Skip to content

Commit fe8a5e3

Browse files
committed
Record unit and integration tests for Issue#pull_requests
1 parent 9d40f96 commit fe8a5e3

3 files changed

Lines changed: 40 additions & 5 deletions

File tree

Lines changed: 1 addition & 0 deletions

tests/integration/test_issue.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,13 @@ def test_labels(self):
4040
assert issue is not None
4141
for label in issue.labels():
4242
assert isinstance(label, github3.issues.label.Label)
43+
44+
def test_pull_request(self):
45+
"""Test the ability to retrieve the PR associated with an issue."""
46+
cassette_name = self.cassette_name('pull_request')
47+
with self.recorder.use_cassette(cassette_name):
48+
issue = self.gh.issue('sigmavirus24', 'github3.py', 301)
49+
assert issue is not None
50+
pull_request = issue.pull_request()
51+
52+
assert isinstance(pull_request, github3.pulls.PullRequest)

tests/unit/test_issues_issue.py

Lines changed: 29 additions & 5 deletions

0 commit comments

Comments
 (0)