Fixes found with credentials. · fenekku/github3.py@e186802 · GitHub
Skip to content

Commit e186802

Browse files
committed
Fixes found with credentials.
That accidental deletion in tests/base.py really prevented me from finding a lot of errors sooner but hey, at least I found them, right?
1 parent a1b8f64 commit e186802

6 files changed

Lines changed: 9 additions & 7 deletions

File tree

github3/repos.py

Lines changed: 2 additions & 2 deletions

tests/test_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,5 @@ def test_authorize(self):
9393
'Test github3.py',
9494
'https://github.com/sigmavirus24/github3.py')
9595
expect(authorization).isinstance(github3.github.Authorization)
96+
authorization._session.auth = (self.user, self.pw)
9697
expect(authorization.delete()).is_True()

tests/test_github.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def test_issues(self):
120120
if self.auth:
121121
i = self._g.create_issue(self.gh3py, self.test_repo,
122122
'Testing github3.py', 'Ignore this.')
123-
expect(i).isinstance(github3.issue.Issue)
123+
expect(i).isinstance(github3.issues.Issue)
124124
expect(i.close()).is_True()
125125

126126
def test_keys(self):

tests/test_orgs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def test_with_auth(self):
6969
org = Organization(self.org.to_json(), self._g)
7070
try:
7171
expect(org.add_member('jcordasc', 'Collaborators')).is_True()
72-
expect(org.remove_member('jcordasc', 'Collaborators')).is_True()
72+
expect(org.remove_member('jcordasc')).is_True()
7373
except github3.GitHubError:
7474
pass
7575

@@ -120,5 +120,5 @@ def test_with_auth(self):
120120
class TestTeam(BaseTest):
121121
pass
122122

123-
# I have to decide how to test Teams. They're all entirely dependent upon
123+
# I have to decide how to test Teams. They're all entirely dependent upon
124124
# being authenticated and being part of an organization.

tests/test_pulls.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ def test_user(self):
140140
def test_with_auth(self):
141141
if not self.auth:
142142
return
143-
pr = self._g.repository(self.gh3py, self.test_repo)
143+
r = self._g.repository(self.gh3py, self.test_repo)
144+
pr = r.pull_request(2)
144145
title, body, state = pr.title, pr.body, pr.state
145146
expect(pr.update('Test editing', 'New body')).is_True()
146147
expect(pr.update(title, body, state)).is_True()

tests/test_users.py

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)