本文整理汇总了Python中pygithub3.tests.utils.base.mock_response_result函数的典型用法代码示例。如果您正苦于以下问题:Python mock_response_result函数的具体用法?Python mock_response_result怎么用?Python mock_response_result使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mock_response_result函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_LIST_BY_ORG_filters
def test_LIST_BY_ORG_filters(self, request_method):
request_method.return_value = mock_response_result()
self.rs.list_by_org('org_name', type='public').all()
self.assertEqual(request_method.call_args[0],
('get', _('orgs/org_name/repos')))
self.assertEqual(request_method.call_args[1]['params']['type'],
'public')
开发者ID:5783354,项目名称:python-github3,代码行数:7,代码来源:test_repos.py
示例2: test_LIST
def test_LIST(self, reqm):
reqm.return_value = mock_response_result()
self.service.list().all()
self.assertEqual(
reqm.call_args[0],
('get', _('repos/user/repo/pulls'))
)
开发者ID:KWMalik,项目名称:python-github3,代码行数:7,代码来源:test_pull_requests.py
示例3: test_LIST_filters
def test_LIST_filters(self, request_method):
request_method.return_value = mock_response_result()
self.rs.list('octoc', type='public').all()
self.assertEqual(request_method.call_args[0],
('get', _('users/octoc/repos')))
self.assertEqual(request_method.call_args[1]['params']['type'],
'public')
开发者ID:5783354,项目名称:python-github3,代码行数:7,代码来源:test_repos.py
示例4: test_LIST_COMMITS
def test_LIST_COMMITS(self, reqm):
reqm.return_value = mock_response_result('get')
self.service.list_commits(123).all()
self.assertEqual(
reqm.call_args[0],
('get', _('repos/user/repo/pulls/123/commits'))
)
开发者ID:KWMalik,项目名称:python-github3,代码行数:7,代码来源:test_pull_requests.py
示例5: test_GET
def test_GET(self, request_method):
request_method.return_value = mock_response_result()
self.ts.get(1)
self.assertEqual(request_method.call_args[0], ('get', _('teams/1')))
开发者ID:5783354,项目名称:python-github3,代码行数:4,代码来源:test_orgs.py
示例6: test_LIST_by_issue
def test_LIST_by_issue(self, request_method):
request_method.return_value = mock_response_result()
self.ev.list_by_issue(1).all()
self.assertEqual(request_method.call_args[0],
('get', _('repos/octocat/Hello-World/issues/1/events')))
开发者ID:5783354,项目名称:python-github3,代码行数:5,代码来源:test_issues.py
示例7: test_REMOVE_TEAM_REPO
def test_REMOVE_TEAM_REPO(self, request_method):
request_method.return_value = mock_response_result('delete')
self.ts.remove_repo(1, 'octocat', 're_oct')
self.assertEqual(request_method.call_args[0],
('delete', _('teams/1/repos/octocat/re_oct')))
开发者ID:5783354,项目名称:python-github3,代码行数:5,代码来源:test_orgs.py
示例8: test_CONTAINS_REPO
def test_CONTAINS_REPO(self, request_method):
request_method.return_value = mock_response_result()
self.ts.contains_repo(1, 'octocat', 're_oct')
self.assertEqual(request_method.call_args[0],
('head', _('teams/1/repos/octocat/re_oct')))
开发者ID:5783354,项目名称:python-github3,代码行数:5,代码来源:test_orgs.py
示例9: test_REMOVE_MEMBER
def test_REMOVE_MEMBER(self, request_method):
request_method.return_value = mock_response_result('delete')
self.ts.remove_member(1, 'octocat')
self.assertEqual(request_method.call_args[0],
('delete', _('teams/1/members/octocat')))
开发者ID:5783354,项目名称:python-github3,代码行数:5,代码来源:test_orgs.py
示例10: test_DELETE
def test_DELETE(self, request_method):
request_method.return_value = mock_response_result('delete')
self.ts.delete(1)
self.assertEqual(request_method.call_args[0], ('delete', _('teams/1')))
开发者ID:5783354,项目名称:python-github3,代码行数:4,代码来源:test_orgs.py
示例11: test_LIST_without_user
def test_LIST_without_user(self, request_method):
request_method.return_value = mock_response_result()
self.rs.set_user('')
self.rs.list().all()
self.assertEqual(request_method.call_args[0], ('get', _('user/repos')))
开发者ID:5783354,项目名称:python-github3,代码行数:5,代码来源:test_repos.py
示例12: test_LIST
def test_LIST(self, request_method):
request_method.return_value = mock_response_result()
self.cs.list().all()
self.assertEqual(request_method.call_args[0],
('get', _('repos/octocat/oc_repo/collaborators')))
开发者ID:5783354,项目名称:python-github3,代码行数:5,代码来源:test_repos.py
示例13: test_LIST_comments_for_commit
def test_LIST_comments_for_commit(self, request_method):
request_method.return_value = mock_response_result()
self.cs.list_comments(sha='e3bc').all()
self.assertEqual(request_method.call_args[0],
('get', _('repos/oct/re_oct/commits/e3bc/comments')))
开发者ID:5783354,项目名称:python-github3,代码行数:5,代码来源:test_repos.py
示例14: test_LIST_branches
def test_LIST_branches(self, request_method):
request_method.return_value = mock_response_result()
self.rs.list_branches().all()
self.assertEqual(request_method.call_args[0],
('get', _('repos/octocat/octocat_repo/branches')))
开发者ID:5783354,项目名称:python-github3,代码行数:5,代码来源:test_repos.py
示例15: test_LIST_contributors_with_anonymous
def test_LIST_contributors_with_anonymous(self, request_method):
request_method.return_value = mock_response_result()
self.rs.list_contributors_with_anonymous().all()
self.assertEqual(request_method.call_args[0],
('get', _('repos/octocat/octocat_repo/contributors')))
self.assertEqual(request_method.call_args[1]['params']['anom'], True)
开发者ID:5783354,项目名称:python-github3,代码行数:6,代码来源:test_repos.py
示例16: test_LIST_with_user_in_service
def test_LIST_with_user_in_service(self, request_method):
request_method.return_value = mock_response_result()
self.rs.list().all()
self.assertEqual(request_method.call_args[0],
('get', _('users/octocat/repos')))
开发者ID:fmarcos83,项目名称:python-github3,代码行数:5,代码来源:test_repos.py
示例17: test_CREATE
def test_CREATE(self, request_method):
request_method.return_value = mock_response_result('post')
self.ts.create('acme', dict(name='new'))
self.assertEqual(request_method.call_args[0],
('post', _('orgs/acme/teams')))
开发者ID:5783354,项目名称:python-github3,代码行数:5,代码来源:test_orgs.py
示例18: test_LIST_repos_with_user
def test_LIST_repos_with_user(self, request_method):
request_method.return_value = mock_response_result()
self.ws.list_repos('oct').all()
self.assertEqual(request_method.call_args[0],
('get', _('users/oct/watched')))
开发者ID:5783354,项目名称:python-github3,代码行数:5,代码来源:test_repos.py
示例19: test_UPDATE
def test_UPDATE(self, request_method):
request_method.return_value = mock_response_result()
self.ts.update(1, dict(name='edited'))
self.assertEqual(request_method.call_args[0], ('patch', _('teams/1')))
开发者ID:5783354,项目名称:python-github3,代码行数:4,代码来源:test_orgs.py
示例20: test_ADD_MEMBER
def test_ADD_MEMBER(self, request_method):
request_method.return_value = mock_response_result()
self.ts.add_member(1, 'octocat')
self.assertEqual(request_method.call_args[0],
('put', _('teams/1/members/octocat')))
开发者ID:5783354,项目名称:python-github3,代码行数:5,代码来源:test_orgs.py
注:本文中的pygithub3.tests.utils.base.mock_response_result函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论