def setup_method(self, method):
self.patch_repo_config = patch.object(RepoHandler, 'get_config_value')
self.patch_open_pull_requests = patch.object(RepoHandler, 'open_pull_requests')
self.patch_labels = patch.object(PullRequestHandler, 'labels', new_callable=PropertyMock)
self.patch_last_commit_date = patch.object(PullRequestHandler, 'last_commit_date', new_callable=PropertyMock)
self.patch_find_comments = patch.object(PullRequestHandler, 'find_comments')
self.patch_submit_comment = patch.object(PullRequestHandler, 'submit_comment')
self.patch_close = patch.object(PullRequestHandler, 'close')
self.autoclose_stale = self.patch_repo_config.start()
self.open_pull_requests = self.patch_open_pull_requests.start()
self.labels = self.patch_labels.start()
self.last_commit_date = self.patch_last_commit_date.start()
self.find_comments = self.patch_find_comments.start()
self.submit_comment = self.patch_submit_comment.start()
self.close = self.patch_close.start()
评论列表
文章目录