Skip to content

Commit

Permalink
Add another test.
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmavirus24 committed Nov 11, 2012
1 parent e3d11ff commit b444ee0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/json/legacy_issue
@@ -0,0 +1 @@
{"issues": [{"body": "", "votes": 0, "labels": ["bug"], "title": "Installation fails without requests installed", "updated_at": "2012-07-02T12:13:16-07:00", "created_at": "2012-07-01T20:29:45-07:00", "gravatar_id": "c148356d89f925e692178bee1d93acf7", "html_url": "https://github.com/sigmavirus24/github3.py/issues/2", "comments": 1, "number": 2, "state": "closed", "user": "sigmavirus24", "position": 1.0, "closed_at": "2012-07-02T12:13:16-07:00"}]}
13 changes: 13 additions & 0 deletions tests/test_github.py
Expand Up @@ -427,3 +427,16 @@ def test_repository(self):
repo = self.g.repository('sigmavirus24', 'github3.py')
expect(repo).isinstance(github3.repos.Repository)
self.mock_assertions(*args, **self.conf)

def test_search_issues(self):
self.request.return_value = generate_response('legacy_issue')
args = ('get',
'https://api.github.com/legacy/{0}/{1}/{2}/{3}/{4}/{5}'.format(
'issues', 'search', 'sigmavirus24', 'github3.py',
'closed', 'requests'
))
issues = self.g.search_issues('sigmavirus24', 'github3.py', 'closed',
'requests')

expect(issues[0]).isinstance(github3.legacy.LegacyIssue)
self.mock_assertions(*args, **self.conf)

0 comments on commit b444ee0

Please sign in to comment.