• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python services._函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中pygithub3.tests.utils.services._函数的典型用法代码示例。如果您正苦于以下问题:Python _函数的具体用法?Python _怎么用?Python _使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了_函数的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_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


示例3: test_IS_MERGED

 def test_IS_MERGED(self, reqm):
     resp = self.service.is_merged(123)
     self.assertTrue(resp)
     self.assertEqual(
         reqm.call_args[0],
         ('head', _('repos/user/repo/pulls/123/merge'))
     )
开发者ID:KWMalik,项目名称:python-github3,代码行数:7,代码来源:test_pull_requests.py


示例4: test_delete

 def test_delete(self, reqm):
     reqm.return_value = mock_response('delete')
     self.service.delete('branch')
     self.assertEqual(
         reqm.call_args[0],
         ('delete', _('repos/user/repo/git/refs/branch'))
     )
开发者ID:KWMalik,项目名称:python-github3,代码行数:7,代码来源:test_git_data.py


示例5: test_update

 def test_update(self, reqm):
     reqm.return_value = mock_response('patch')
     self.service.update('master', {'sha': 'abc123'})
     self.assertEqual(
         reqm.call_args[0],
         ('patch', _('repos/user/repo/git/refs/master'))
     )
开发者ID:KWMalik,项目名称:python-github3,代码行数:7,代码来源:test_git_data.py


示例6: test_create

 def test_create(self, reqm):
     reqm.return_value = mock_response('post')
     self.service.create({'sha': 'hello', 'ref': 'something'})
     self.assertEqual(
         reqm.call_args[0],
         ('post', _('repos/user/repo/git/refs'))
     )
开发者ID:KWMalik,项目名称:python-github3,代码行数:7,代码来源:test_git_data.py


示例7: test_GET

 def test_GET(self, reqm):
     reqm.return_value = mock_response()
     self.service.get(123)
     self.assertEqual(
         reqm.call_args[0],
         ('get', _('repos/user/repo/pulls/123'))
     )
开发者ID:KWMalik,项目名称:python-github3,代码行数:7,代码来源:test_pull_requests.py


示例8: test_MERGE

 def test_MERGE(self, reqm):
     reqm.return_value = mock_response(200)
     self.service.merge(123, 'merging this')
     self.assertEqual(
         reqm.call_args[0],
         ('put', _('repos/user/repo/pulls/123/merge'))
     )
开发者ID:KWMalik,项目名称:python-github3,代码行数:7,代码来源:test_pull_requests.py


示例9: 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


示例10: test_GET

 def test_GET(self, reqm):
     reqm.return_value = mock_response()
     self.service.get('abc123')
     self.assertEqual(
         reqm.call_args[0],
         ('get', _('repos/octocat/repo/git/commits/abc123'))
     )
开发者ID:KWMalik,项目名称:python-github3,代码行数:7,代码来源:test_git_data.py


示例11: test_DELETE

 def test_DELETE(self, reqm):
     reqm.return_value = mock_response(204)
     self.service.delete(1)
     self.assertEqual(
         reqm.call_args[0],
         ('delete', _('repos/user/repo/pulls/comments/1'))
     )
开发者ID:KWMalik,项目名称:python-github3,代码行数:7,代码来源:test_pull_requests.py


示例12: 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


示例13: test_CREATE_comment

 def test_CREATE_comment(self, request_method):
     request_method.return_value = mock_response('post')
     data = dict(body='some', commit_id='e2bc',
                 line=1, path='some.txt', position=1)
     self.cs.create_comment(data, 'e3bc')
     self.assertEqual(request_method.call_args[0],
                      ('post', _('repos/oct/re_oct/commits/e3bc/comments')))
开发者ID:5783354,项目名称:python-github3,代码行数:7,代码来源:test_repos.py


示例14: test_WITH_mimetype

 def test_WITH_mimetype(self, request_method):
     request_method.return_value = mock_response()
     self.ms.set_html()
     self.ms.dummy_request()
     request_method.assert_called_with('get', _('dummyrequest'),
         headers={'Accept': 'application/vnd.github.%s.html+json' %
                             MimeTypeMixin.VERSION},
         params={})
开发者ID:agargiulo,项目名称:python-github3,代码行数:8,代码来源:test_core.py


示例15: test_CREATE

 def test_CREATE(self, reqm):
     reqm.return_value = mock_response('post')
     self.service.create({'tag': 'v1.2.3', 'message': 'a tag',
                          'object': 'abc123', 'type': 'commit'})
     self.assertEqual(
         reqm.call_args[0],
         ('post', _('repos/user/repo/git/tags'))
     )
开发者ID:KWMalik,项目名称:python-github3,代码行数:8,代码来源:test_git_data.py


示例16: test_UPDATE

 def test_UPDATE(self, reqm):
     reqm.return_value = mock_response('patch')
     data = {}
     self.service.update(123, data)
     self.assertEqual(
         reqm.call_args[0],
         ('patch', _('repos/user/repo/pulls/123'))
     )
开发者ID:KWMalik,项目名称:python-github3,代码行数:8,代码来源:test_pull_requests.py


示例17: test_CREATE

 def test_CREATE(self, request_method):
     request_method.return_value = mock_response('post')
     self.ss.create({"state": "success",
                     "target_url": "https://example.com/build/status",
                     "description": "The build succeeded!"},
                    sha='e3bc')
     self.assertEqual(request_method.call_args[0],
                      ('post', _('repos/oct/re_oct/statuses/e3bc')))
开发者ID:shanereid,项目名称:python-github3,代码行数:8,代码来源:test_repos.py


示例18: test_WITH_mimetype

 def test_WITH_mimetype(self, request_method):
     request_method.return_value = mock_response()
     self.ms.set_html()
     self.ms.dummy_request()
     request_method.assert_called_with(
         "get",
         _("dummyrequest"),
         headers={"Accept": "application/vnd.github.%s.html+json" % MimeTypeMixin.VERSION},
         params={},
     )
开发者ID:ad-m,项目名称:python-github3,代码行数:10,代码来源:test_core.py


示例19: test_CREATE_in_reply_to

 def test_CREATE_in_reply_to(self, reqm):
     reqm.return_value = mock_response(201)
     data = {
         'body': ':sparkles:',
         'in_reply_to': '5',
     }
     self.service.create(1, data)
     self.assertEqual(
         reqm.call_args[0],
         ('post', _('repos/user/repo/pulls/1/comments'))
     )
开发者ID:KWMalik,项目名称:python-github3,代码行数:11,代码来源:test_pull_requests.py


示例20: test_CREATE_with_issue

 def test_CREATE_with_issue(self, reqm):
     reqm.return_value = mock_response('post')
     data = {
         'issue': 1,
         'head': 'octocat:some-feature',
         'base': 'master',
     }
     self.service.create(data)
     self.assertEqual(
         reqm.call_args[0],
         ('post', _('repos/user/repo/pulls'))
     )
开发者ID:KWMalik,项目名称:python-github3,代码行数:12,代码来源:test_pull_requests.py



注:本文中的pygithub3.tests.utils.services._函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python PyGlassEnvironment.PyGlassEnvironment类代码示例发布时间:2022-05-25
下一篇:
Python base.mock_response_result函数代码示例发布时间:2022-05-25
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap