mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 19:31:10 +00:00
Improve test coverage (pull #148)
This commit is contained in:
@@ -194,6 +194,13 @@ class AuthenticatedUser(Framework.TestCase):
|
||||
self.assertEqual(notification.subject.title, "Feature/coveralls")
|
||||
self.assertEqual(notification.subject.type, "PullRequest")
|
||||
self.assertEqual(notification.repository.id, 8432784)
|
||||
self.assertEqual(notification.updated_at, datetime.datetime(2013, 3, 15, 5, 43, 11))
|
||||
self.assertEqual(notification.url, None)
|
||||
self.assertEqual(notification.subject.url, None)
|
||||
self.assertEqual(notification.subject.latest_comment_url, None)
|
||||
|
||||
def testGetNotifications(self):
|
||||
self.assertListKeyBegin(self.user.get_notifications(participating=True), lambda n: n.id, ["8406712"])
|
||||
self.assertListKeyEqual(self.user.get_notifications(participating=True), lambda n: n.id, ["8406712"])
|
||||
|
||||
def testGetNotificationsWithOtherArguments(self):
|
||||
self.assertListKeyEqual(self.user.get_notifications(all=True), lambda n: n.id, [])
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
https GET api.github.com None /notifications?all=True {'Authorization': 'Basic login_and_password_removed'} null
|
||||
200
|
||||
[('status', '200 OK'), ('x-ratelimit-remaining', '4999'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('content-length', '2'), ('server', 'GitHub.com'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d751713988987e9331980363e24189ce"'), ('cache-control', 'max-age=0, private, must-revalidate'), ('date', 'Tue, 19 Mar 2013 21:05:52 GMT'), ('content-type', 'application/json; charset=utf-8')]
|
||||
[]
|
||||
|
||||
Reference in New Issue
Block a user