Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6e97462

Browse files
committed
Fix old events tests
(cherry picked from commit7a60063)
1 parent54c5e7f commit6e97462

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

‎github3/events.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class Event(GitHubCore):
2929
3030
"""
3131

32-
def__init__(self,event):
33-
super(Event,self).__init__(event)
32+
def__init__(self,event,session=None):
33+
super(Event,self).__init__(event,session)
3434
from .usersimportUser
3535
from .orgsimportOrganization
3636
#: :class:`User <github3.users.User>` object representing the actor.

‎tests/test_events.py‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,55 +41,55 @@ def test_is_public(self):
4141
classTestPayloadHandlers(TestCase):
4242
deftest_commitcomment(self):
4343
comment= {'comment':load('repo_comment')}
44-
comment=github3.events._commitcomment(comment)
44+
comment=github3.events._commitcomment(comment,None)
4545
assertisinstance(comment['comment'],
4646
github3.repos.comment.RepoComment)
4747

4848
deftest_follow(self):
4949
f= {'target':load('user')}
50-
github3.events._follow(f)
50+
github3.events._follow(f,None)
5151
assertisinstance(f['target'],github3.users.User)
5252

5353
deftest_forkev(self):
5454
f= {'forkee':load('repo')}
55-
github3.events._forkev(f)
55+
github3.events._forkev(f,None)
5656
assertisinstance(f['forkee'],github3.repos.Repository)
5757

5858
deftest_gist(self):
5959
g= {'gist':load('gist')}
60-
github3.events._gist(g)
60+
github3.events._gist(g,None)
6161
assertisinstance(g['gist'],github3.gists.Gist)
6262

6363
deftest_issuecomm(self):
6464
c= {'issue':load('issue'),'comment':load('issue_comment')}
65-
github3.events._issuecomm(c)
65+
github3.events._issuecomm(c,None)
6666
assertisinstance(c['issue'],github3.issues.Issue)
6767
assertisinstance(c['comment'],github3.issues.comment.IssueComment)
6868

6969
deftest_issueevent(self):
7070
c= {'issue':load('issue')}
71-
github3.events._issueevent(c)
71+
github3.events._issueevent(c,None)
7272
assertisinstance(c['issue'],github3.issues.Issue)
7373

7474
deftest_member(self):
7575
m= {'member':load('user')}
76-
github3.events._member(m)
76+
github3.events._member(m,None)
7777
assertisinstance(m['member'],github3.users.User)
7878

7979
deftest_pullreqev(self):
8080
p= {'pull_request':load('pull')}
81-
github3.events._pullreqev(p)
81+
github3.events._pullreqev(p,None)
8282
assertisinstance(p['pull_request'],github3.pulls.PullRequest)
8383

8484
deftest_pullreqcomm(self):
8585
p= {'comment':load('review_comment')}
86-
github3.events._pullreqcomm(p)
86+
github3.events._pullreqcomm(p,None)
8787
assertisinstance(p['comment'],github3.pulls.ReviewComment)
8888

8989
@pytest.mark.xfail
9090
deftest_team(payload):
9191
t= {'team':load('team'),'repo':load('repo'),'user':load('user')}
92-
github3.events._team(t)
92+
github3.events._team(t,None)
9393
assertisinstance(t['team'],github3.orgs.Team)
9494
assertisinstance(t['repo'],github3.repos.Repository)
9595
assertisinstance(t['user'],github3.users.User)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp