forked from ask/python-github2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_pull_requests.py
More file actions
26 lines (19 loc) · 937 Bytes
/
Copy pathtest_pull_requests.py
File metadata and controls
26 lines (19 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import _setup
from nose.tools import assert_equals
import utils
class PullRequest(utils.HttpMockTestCase):
def test_repr(self):
pull_request = self.client.pull_requests.show('ask/python-github2', 39)
assert_equals(repr(pull_request),
'<PullRequest: Datetime timezone...>')
class PullRequestQueries(utils.HttpMockTestCase):
"""Test pull request querying"""
def test_list(self):
pull_requests = self.client.pull_requests.list('ask/python-github2')
assert_equals(len(pull_requests), 1)
assert_equals(pull_requests[0].title, 'Pagination support for commits.')
def test_list_with_page(self):
pull_requests = self.client.pull_requests.list('robbyrussell/oh-my-zsh',
page=2)
assert_equals(len(pull_requests), 52)
assert_equals(pull_requests[1].title, 'Added my own custom theme')