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:
Mike Miller
2017-11-23 03:49:41 -08:00
committed by Jason White
parent 554c1ab124
commit ebe7277a7f
2 changed files with 14 additions and 0 deletions
+3
View File
@@ -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)')