8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a24e08e commit d2b8460Copy full SHA for d2b8460
tests/test_repos.py
@@ -443,3 +443,16 @@ def test_git_commit(self):
443
expect(self.request.called).is_False()
444
expect(self.repo.git_commit('fakesha')).isinstance(github3.git.Commit)
445
self.mock_assertions()
446
+
447
+ def test_hook(self):
448
+ self.request.return_value = generate_response('hook')
449
+ self.args = ('GET', self.api + 'hooks/2')
450
451
+ with expect.githuberror():
452
+ self.repo.hook(2)
453
454
+ self.login()
455
+ expect(self.repo.hook(-2)).is_None()
456
+ expect(self.request.called).is_False()
457
+ expect(self.repo.hook(2)).isinstance(github3.repos.Hook)
458
+ self.mock_assertions()
0 commit comments