Skip to content

Commit

Permalink
Made Repo.issues return Issue objects
Browse files Browse the repository at this point in the history
  • Loading branch information
Singletoned committed Nov 1, 2011
1 parent 31d8de8 commit 21c07f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion github.py
Expand Up @@ -74,7 +74,8 @@ def issues(self):
url("repos", self.user.login, self.name, "issues"))
content = response.content
data = json.loads(content)
return data
issues = [Issue(i) for i in data]
return issues

def get_issue(self, number):
response = requests.get(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pygithub.py
Expand Up @@ -35,7 +35,7 @@ def test_repos():

def test_issues():
repo = gh.user.get_repo('pygithub')
issue_titles = [i['title'] for i in repo.issues]
issue_titles = [i.title for i in repo.issues]
assert "Test Issue" in issue_titles

issue = repo.get_issue(2)
Expand Down

0 comments on commit 21c07f1

Please sign in to comment.