def test__create_github_build_status__calls_github_client_properly(self):
github_client: github.Github = mock(spec=github.Github, strict=True)
github_repo: github.Repository.Repository = mock(spec=github.Repository.Repository, strict=True)
github_commit: github.Commit.Commit = mock(spec=github.Commit.Commit, strict=True)
github_controller = GithubController(github_client, mock(), mock(), mock())
expect(github_client).get_repo('repo').thenReturn(github_repo)
expect(github_repo).get_commit('123456').thenReturn(github_commit)
expect(github_commit).create_status(state='pending',
target_url='http://example.com',
description='whatever you need',
context='job')
await github_controller.create_github_build_status('repo', '123456', 'pending', 'http://example.com', 'whatever you need', 'job')
评论列表
文章目录