mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 03:41:08 +00:00
Add 'submitted at' to PullRequestReview (#565)
This field is not currently listed in the Github documentation at https://developer.github.com/v3/pulls/reviews/, but it's been included since Github 2.9 (It even exists in the test data returned for the original PullRequestReview PR)
This commit is contained in:
@@ -26,6 +26,8 @@
|
||||
|
||||
import Framework
|
||||
|
||||
import datetime
|
||||
|
||||
class PullRequestReview(Framework.TestCase):
|
||||
def setUp(self):
|
||||
Framework.TestCase.setUp(self)
|
||||
@@ -46,6 +48,7 @@ class PullRequestReview(Framework.TestCase):
|
||||
self.assertEqual(self.pullreview.state, "APPROVED")
|
||||
self.assertEqual(self.pullreview.html_url, "https://github.com/PyGithub/PyGithub/pull/538#pullrequestreview-28482091")
|
||||
self.assertEqual(self.pullreview.pull_request_url, "https://api.github.com/repos/PyGithub/PyGithub/pulls/538")
|
||||
self.assertEqual(self.pullreview.submitted_at, datetime.datetime(2017, 3, 22, 19, 6, 59))
|
||||
|
||||
# test __repr__() based on this attributes
|
||||
self.assertEqual(self.pullreview.__repr__(), 'PullRequestReview(user=NamedUser(login="jzelinskie"), id=28482091)')
|
||||
|
||||
Reference in New Issue
Block a user