8000 Fix old events tests · staticdev/github4.py@6e97462 · GitHub
[go: up one dir, main page]

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

Appearance settings
This repository was archived by the owner on May 22, 2021. It is now read-only.

Commit 6e97462

Browse files
committed
Fix old events tests
(cherry picked from commit 7a60063)
1 parent 54c5e7f commit 6e97462

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 .users import User
3535
from .orgs import Organization
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
class TestPayloadHandlers(TestCase):
4242
def test_commitcomment(self):
4343
comment = {'comment': load('repo_comment')}
44-
comment = github3.events._commitcomment(comment)
44+
comment = github3.events._commitcomment(comment, None)
4545
assert isinstance(comment['comment'],
4646
github3.repos.comment.RepoComment)
4747

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

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

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

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

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

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

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

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

8989
@pytest.mark.xfail
9090
def test_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
assert isinstance(t['team'], github3.orgs.Team)
9494
assert isinstance(t['repo'], github3.repos.Repository)
9595
assert isinstance(t['user'], github3.users.User)

0 commit comments

Comments
 (0)
0