aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/tests
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2012-05-12 19:04:23 +0200
committerDavid Medina <davidmedina9@gmail.com>2012-05-12 22:47:09 +0200
commit24a3ed5dcd2264a64e234ea7bd526049fafe7616 (patch)
tree6131f221a9bf9b596dc139715d4e79f090bb55c3 /pygithub3/tests
parentDeleted 'dispatch' decorator. No sense (diff)
downloadpython-github3-24a3ed5dcd2264a64e234ea7bd526049fafe7616.tar.xz
python-github3-24a3ed5dcd2264a64e234ea7bd526049fafe7616.zip
Some fixes/typos and 'validate_body' related
Diffstat (limited to 'pygithub3/tests')
-rw-r--r--pygithub3/tests/services/test_pull_requests.py19
1 files changed, 4 insertions, 15 deletions
diff --git a/pygithub3/tests/services/test_pull_requests.py b/pygithub3/tests/services/test_pull_requests.py
index 7fc15b7..93646df 100644
--- a/pygithub3/tests/services/test_pull_requests.py
+++ b/pygithub3/tests/services/test_pull_requests.py
@@ -7,8 +7,7 @@ from nose.tools import raises
from pygithub3.tests.utils.core import TestCase
from pygithub3.services.pull_requests import PullRequests, Comments
-from pygithub3.resources.base import json
-from pygithub3.requests.base import ValidationError
+from pygithub3.requests.base import ValidationError, json
from pygithub3.tests.utils.base import (mock_response, mock_response_result,
mock_json)
from pygithub3.tests.utils.services import _
@@ -107,19 +106,9 @@ class TestPullRequestsService(TestCase):
('get', _('repos/user/repo/pulls/123/files'))
)
- def test_MERGE_STATUS_true(self, reqm):
- reqm.return_value = mock_response(204)
- resp = self.service.merge_status(123)
- self.assertEqual(True, resp)
- self.assertEqual(
- reqm.call_args[0],
- ('head', _('repos/user/repo/pulls/123/merge'))
- )
-
- def test_MERGE_STATUS_false(self, reqm):
- reqm.return_value = mock_response(404)
- resp = self.service.merge_status(123)
- self.assertEqual(False, resp)
+ def test_IS_MERGED(self, reqm):
+ resp = self.service.is_merged(123)
+ self.assertTrue(resp)
self.assertEqual(
reqm.call_args[0],
('head', _('repos/user/repo/pulls/123/merge'))