10000 Clean up integration tests for PullRequest review preview · pythonthings/github3.py@9aa43ea · GitHub
[go: up one dir, main page]

Skip to content

Commit 9aa43ea

Browse files
committed
Clean up integration tests for PullRequest review preview
1 parent 8e9ca00 commit 9aa43ea

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

tests/integration/test_pulls.py

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def test_pull_reviews(self):
113113
p = self.get_pull_request(num=671)
114114
for pull_review in p.reviews():
115115
assert isinstance(pull_review, github3.pulls.PullReview)
116+
assert isinstance(pull_review.user, github3.users.User)
116117

117118
def test_reopen(self):
118119
"""Show that one can reopen an open Pull Request."""
@@ -147,31 +148,6 @@ def test_repository(self):
147148
assert p.repository == ('sigmavirus24', 'github3.py')
148149

149150

150-
class TestPullReview(IntegrationHelper):
151-
"""Integration tests for the PullFile object."""
152-
def get_pull_request_review(self, owner, repo, pull_number, review):
153-
p = self.gh.pull_request(owner, repo, pull_number)
154-
155-
for pull_review in p.reviews():
156-
if pull_review.id == review:
157-
break
158-
else:
159-
assert False, "Could not find '{0}'".format(review)
160-
161-
return pull_review
162-
163-
def test_user(self):
164-
"""Show that a user can retrieve the user of a PR review."""
165-
cassette_name = self.cassette_name('pull_reviews')
166-
with self.recorder.use_cassette(cassette_name):
167-
pull_review = self.get_pull_request_review(
168-
owner='sigmavirus24', repo='github3.py', pull_number=671,
169-
review=18663174
170-
)
171-
user = pull_review.user
172-
assert isinstance(user, github3.users.User)
173-
174-
175151
class TestReviewComment(IntegrationHelper):
176152

177153
"""Integration tests for the ReviewComment object."""

0 commit comments

Comments
 (0)
0