コード例 #1
0
 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')
コード例 #2
0
ファイル: test_repos.py プロジェクト: 5783354/python-github3
 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')
コード例 #3
0
 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'))
     )
コード例 #4
0
ファイル: test_repos.py プロジェクト: 5783354/python-github3
 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')
コード例 #5
0
 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'))
     )
コード例 #6
0
 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/git/refs'))
     )
コード例 #7
0
 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')
コード例 #8
0
ファイル: test_repos.py プロジェクト: 5783354/python-github3
 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')))
コード例 #9
0
ファイル: test_repos.py プロジェクト: 5783354/python-github3
 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')))
コード例 #10
0
 def test_LIST(self, request_method):
     request_method.return_value = mock_response_result()
     self.hs.list().all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('repos/oct/re_oct/hooks')))
コード例 #11
0
ファイル: test_orgs.py プロジェクト: 5783354/python-github3
 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')))
コード例 #12
0
ファイル: test_orgs.py プロジェクト: 5783354/python-github3
 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')))
コード例 #13
0
ファイル: test_orgs.py プロジェクト: 5783354/python-github3
 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')))
コード例 #14
0
 def test_LIST_without_user(self, request_method):
     request_method.return_value = mock_response_result()
     self.isu.list().all()
     self.assertEqual(request_method.call_args[0], ('get', _('issues')))
コード例 #15
0
ファイル: test_orgs.py プロジェクト: tirimula/ITSP
 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')))
コード例 #16
0
ファイル: test_orgs.py プロジェクト: tirimula/ITSP
 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')))
コード例 #17
0
ファイル: test_orgs.py プロジェクト: tirimula/ITSP
 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')))
コード例 #18
0
ファイル: test_orgs.py プロジェクト: tirimula/ITSP
 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')))
コード例 #19
0
ファイル: test_orgs.py プロジェクト: tirimula/ITSP
 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')))
コード例 #20
0
ファイル: test_orgs.py プロジェクト: tirimula/ITSP
 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')))
コード例 #21
0
ファイル: test_orgs.py プロジェクト: tirimula/ITSP
 def test_LIST_REPOS(self, request_method):
     request_method.return_value = mock_response_result()
     self.ts.list_repos(1).all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('teams/1/repos')))
コード例 #22
0
ファイル: test_orgs.py プロジェクト: tirimula/ITSP
 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')))
コード例 #23
0
 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')))
コード例 #24
0
ファイル: test_orgs.py プロジェクト: tirimula/ITSP
 def test_ADD_TEAM_REPO(self, request_method):
     request_method.return_value = mock_response_result()
     self.ts.add_repo(1, 'octocat', 're_oct')
     self.assertEqual(request_method.call_args[0],
                      ('put', _('teams/1/repos/octocat/re_oct')))
コード例 #25
0
ファイル: test_orgs.py プロジェクト: 5783354/python-github3
 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')))
コード例 #26
0
ファイル: test_orgs.py プロジェクト: tirimula/ITSP
 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')))
コード例 #27
0
ファイル: test_orgs.py プロジェクト: 5783354/python-github3
 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')))
コード例 #28
0
ファイル: test_orgs.py プロジェクト: tirimula/ITSP
 def test_LIST_PUBLIC(self, request_method):
     request_method.return_value = mock_response_result()
     self.ms.list_public('acme').all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('orgs/acme/public_members')))
コード例 #29
0
ファイル: test_orgs.py プロジェクト: 5783354/python-github3
 def test_LIST_PUBLIC(self, request_method):
     request_method.return_value = mock_response_result()
     self.ms.list_public('acme').all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('orgs/acme/public_members')))
コード例 #30
0
ファイル: test_orgs.py プロジェクト: tirimula/ITSP
 def test_LIST(self, request_method):
     request_method.return_value = mock_response_result()
     self.ts.list('acme').all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('orgs/acme/teams')))
コード例 #31
0
ファイル: test_repos.py プロジェクト: 5783354/python-github3
 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')))
コード例 #32
0
ファイル: test_repos.py プロジェクト: 5783354/python-github3
 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')))
コード例 #33
0
ファイル: test_repos.py プロジェクト: 5783354/python-github3
 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')))
コード例 #34
0
ファイル: test_repos.py プロジェクト: 5783354/python-github3
 def test_LIST_BY_ORG(self, request_method):
     request_method.return_value = mock_response_result()
     self.rs.list_by_org('org_name').all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('orgs/org_name/repos')))
コード例 #35
0
 def test_LIST_FOLLOWING_with_user(self, request_method):
     request_method.return_value = mock_response_result()
     self.fs.list_following('octocat').all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('users/octocat/following')))
コード例 #36
0
 def test_LIST_contributors(self, request_method):
     request_method.return_value = mock_response_result()
     self.rs.list_contributors().all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('repos/octocat/octocat_repo/contributors')))
コード例 #37
0
ファイル: test_repos.py プロジェクト: 5783354/python-github3
 def test_LIST(self, request_method):
     request_method.return_value = mock_response_result()
     self.hs.list().all()
     self.assertEqual(request_method.call_args[0],
         ('get', _('repos/oct/re_oct/hooks')))
コード例 #38
0
 def test_LIST(self, reqm):
     reqm.return_value = mock_response_result(200)
     self.service.list(123).all()
     self.assertEqual(reqm.call_args[0],
                      ('get', _('repos/user/repo/pulls/123/comments')))
コード例 #39
0
 def test_LIST(self, request_method):
     request_method.return_value = mock_response_result()
     self.es.list().all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('user/emails')))
コード例 #40
0
 def test_LIST_BY_ORG(self, request_method):
     request_method.return_value = mock_response_result()
     self.rs.list_by_org('org_name').all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('orgs/org_name/repos')))
コード例 #41
0
ファイル: test_gists.py プロジェクト: tirimula/ITSP
 def test_LIST_with_user(self, request_method):
     request_method.return_value = mock_response_result()
     self.gs.list('octocat').all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('users/octocat/gists')))
コード例 #42
0
ファイル: test_gists.py プロジェクト: tirimula/ITSP
 def test_LIST_public(self, request_method):
     request_method.return_value = mock_response_result()
     self.gs.public().all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('gists/public')))
コード例 #43
0
 def test_LIST_FILES(self, reqm):
     reqm.return_value = mock_response_result('get')
     self.service.list_files(123).all()
     self.assertEqual(reqm.call_args[0],
                      ('get', _('repos/user/repo/pulls/123/files')))
コード例 #44
0
ファイル: test_gists.py プロジェクト: tirimula/ITSP
 def test_LIST_starred(self, request_method):
     request_method.return_value = mock_response_result()
     self.gs.starred().all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('gists/starred')))
コード例 #45
0
 def test_LIST_by_repo(self, request_method):
     request_method.return_value = mock_response_result()
     self.mi.list().all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('repos/octocat/Hello-World/milestones')))
コード例 #46
0
ファイル: test_gists.py プロジェクト: tirimula/ITSP
 def test_LIST(self, request_method):
     request_method.return_value = mock_response_result()
     self.cs.list(1).all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('gists/1/comments')))
コード例 #47
0
ファイル: test_orgs.py プロジェクト: 5783354/python-github3
 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')))
コード例 #48
0
ファイル: test_users.py プロジェクト: KWMalik/python-github3
 def test_LIST(self, request_method):
     request_method.return_value = mock_response_result()
     self.es.list().all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('user/emails')))
コード例 #49
0
ファイル: test_orgs.py プロジェクト: 5783354/python-github3
 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')))
コード例 #50
0
ファイル: test_repos.py プロジェクト: oracal/python-github3
 def test_LIST_repos(self, request_method):
     request_method.return_value = mock_response_result()
     self.sg.list_repos().all()
     self.assertEqual(request_method.call_args[0],
         ('get', _('user/starred')))
コード例 #51
0
ファイル: test_orgs.py プロジェクト: 5783354/python-github3
 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')))
コード例 #52
0
ファイル: test_issues.py プロジェクト: 5783354/python-github3
 def test_LIST_by_repo(self, request_method):
     request_method.return_value = mock_response_result()
     self.mi.list().all()
     self.assertEqual(request_method.call_args[0],
         ('get', _('repos/octocat/Hello-World/milestones')))
コード例 #53
0
ファイル: test_orgs.py プロジェクト: 5783354/python-github3
 def test_LIST_REPOS(self, request_method):
     request_method.return_value = mock_response_result()
     self.ts.list_repos(1).all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('teams/1/repos')))
コード例 #54
0
ファイル: test_issues.py プロジェクト: 5783354/python-github3
 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')))
コード例 #55
0
ファイル: test_orgs.py プロジェクト: 5783354/python-github3
 def test_ADD_TEAM_REPO(self, request_method):
     request_method.return_value = mock_response_result()
     self.ts.add_repo(1, 'octocat', 're_oct')
     self.assertEqual(request_method.call_args[0],
                      ('put', _('teams/1/repos/octocat/re_oct')))
コード例 #56
0
 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')))
コード例 #57
0
ファイル: test_orgs.py プロジェクト: 5783354/python-github3
 def test_LIST_with_user(self, request_method):
     request_method.return_value = mock_response_result()
     self.org.list('octocat').all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('users/octocat/orgs')))
コード例 #58
0
ファイル: test_repos.py プロジェクト: 5783354/python-github3
 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)
コード例 #59
0
ファイル: test_orgs.py プロジェクト: 5783354/python-github3
 def test_LIST(self, request_method):
     request_method.return_value = mock_response_result()
     self.ts.list('acme').all()
     self.assertEqual(request_method.call_args[0],
                      ('get', _('orgs/acme/teams')))
コード例 #60
0
 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')))