Skip to content
Snippets Groups Projects
Commit 7a60063f authored by Ian Cordasco's avatar Ian Cordasco
Browse files

Fix old events tests

parent 4207e22f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -37,53 +37,53 @@ class TestEvent(BaseCase):
class TestPayloadHandlers(TestCase):
def test_commitcomment(self):
comment = {'comment': load('repo_comment')}
comment = github3.events._commitcomment(comment)
comment = github3.events._commitcomment(comment, None)
assert isinstance(comment['comment'],
github3.repos.comment.RepoComment)
 
def test_follow(self):
f = {'target': load('user')}
github3.events._follow(f)
github3.events._follow(f, None)
assert isinstance(f['target'], github3.users.User)
 
def test_forkev(self):
f = {'forkee': load('repo')}
github3.events._forkev(f)
github3.events._forkev(f, None)
assert isinstance(f['forkee'], github3.repos.Repository)
 
def test_gist(self):
g = {'gist': load('gist')}
github3.events._gist(g)
github3.events._gist(g, None)
assert isinstance(g['gist'], github3.gists.Gist)
 
def test_issuecomm(self):
c = {'issue': load('issue'), 'comment': load('issue_comment')}
github3.events._issuecomm(c)
github3.events._issuecomm(c, None)
assert isinstance(c['issue'], github3.issues.Issue)
assert isinstance(c['comment'], github3.issues.comment.IssueComment)
 
def test_issueevent(self):
c = {'issue': load('issue')}
github3.events._issueevent(c)
github3.events._issueevent(c, None)
assert isinstance(c['issue'], github3.issues.Issue)
 
def test_member(self):
m = {'member': load('user')}
github3.events._member(m)
github3.events._member(m, None)
assert isinstance(m['member'], github3.users.User)
 
def test_pullreqev(self):
p = {'pull_request': load('pull')}
github3.events._pullreqev(p)
github3.events._pullreqev(p, None)
assert isinstance(p['pull_request'], github3.pulls.PullRequest)
 
def test_pullreqcomm(self):
p = {'comment': load('review_comment')}
github3.events._pullreqcomm(p)
github3.events._pullreqcomm(p, None)
assert isinstance(p['comment'], github3.pulls.ReviewComment)
 
def test_team(payload):
t = {'team': load('team'), 'repo': load('repo'), 'user': load('user')}
github3.events._team(t)
github3.events._team(t, None)
assert isinstance(t['team'], github3.orgs.Team)
assert isinstance(t['repo'], github3.repos.Repository)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment