Permalink
Browse files

Add another test.

  • Loading branch information...
1 parent e3d11ff commit b444ee09b266bf049807f2f197ee2ce2322d5e8d @sigmavirus24 committed Nov 11, 2012
Showing with 14 additions and 0 deletions.
  1. +1 −0 tests/json/legacy_issue
  2. +13 −0 tests/test_github.py
View
@@ -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"}]}
View
@@ -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.