test_github_controller.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:triggear 作者: futuresimple 项目源码 文件源码
def test__create_pr_comment__calls_proper_github_entities(self):
        github_client: github.Github = mock(spec=github.Github, strict=True)
        github_repo: github.Repository.Repository = mock(spec=github.Repository.Repository, strict=True)
        github_issue: github.Issue.Issue = mock(spec=github.Issue.Issue, strict=True)
        github_controller = GithubController(github_client, mock(), mock(), mock())

        expect(github_client).get_repo('triggear').thenReturn(github_repo)
        expect(github_repo).get_issue(23).thenReturn(github_issue)
        expect(github_issue).create_comment(body='Comment to send')

        github_controller.create_pr_comment(23, 'triggear', 'Comment to send')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号