aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/tests/services/test_users.py
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2012-03-04 23:45:43 +0100
committerDavid Medina <davidmedina9@gmail.com>2012-03-04 23:45:43 +0100
commitb928c9faf8d2b57afdf32cb233ec83bf3d6a7329 (patch)
tree8285c7e95adb6755c98f44bae6a6861cc6f03a88 /pygithub3/tests/services/test_users.py
parentGet repository's commits supported with new result (diff)
downloadpython-github3-b928c9faf8d2b57afdf32cb233ec83bf3d6a7329.tar.xz
python-github3-b928c9faf8d2b57afdf32cb233ec83bf3d6a7329.zip
Fix requests with invalid config precedence
Diffstat (limited to '')
-rw-r--r--pygithub3/tests/services/test_users.py27
1 files changed, 3 insertions, 24 deletions
diff --git a/pygithub3/tests/services/test_users.py b/pygithub3/tests/services/test_users.py
index f777d6d..317f0d5 100644
--- a/pygithub3/tests/services/test_users.py
+++ b/pygithub3/tests/services/test_users.py
@@ -28,19 +28,12 @@ class TestUserService(TestCase):
self.us.get()
self.assertEqual(request_method.call_args[0], ('get', _('user')))
- def test_GET_with_user_in_arg(self, request_method):
+ def test_GET_with_user(self, request_method):
request_method.return_value = mock_response()
self.us.get('octocat')
self.assertEqual(request_method.call_args[0],
('get', _('users/octocat')))
- def test_GET_with_user_in_service(self, request_method):
- request_method.return_value = mock_response()
- self.us.set_user('octocat_service')
- self.us.get()
- self.assertEqual(request_method.call_args[0],
- ('get', _('users/octocat_service')))
-
def test_UPDATE_with_valid_data(self, request_method):
request_method.return_value = mock_response('patch')
self.us.update({'name': 'dummy'})
@@ -101,38 +94,24 @@ class TestFollowersService(TestCase):
self.assertEqual(request_method.call_args[0],
('get', _('user/followers')))
- def test_LIST_with_user_in_arg(self, request_method):
+ def test_LIST_with_user(self, request_method):
request_method.return_value = mock_response_result()
self.fs.list('octocat').all()
self.assertEqual(request_method.call_args[0],
('get', _('users/octocat/followers')))
- def test_LIST_with_user_in_service(self, request_method):
- request_method.return_value = mock_response_result()
- self.fs.set_user('octocat_service')
- self.fs.list().all()
- self.assertEqual(request_method.call_args[0],
- ('get', _('users/octocat_service/followers')))
-
def test_LIST_FOLLOWING_without_user(self, request_method):
request_method.return_value = mock_response_result()
self.fs.list_following().all()
self.assertEqual(request_method.call_args[0],
('get', _('user/following')))
- def test_LIST_FOLLOWING_with_user_in_arg(self, request_method):
+ def test_LIST_FOLLOWING_with_user(self, request_method):
request_method.return_value = mock_response_result()
self.fs.list_following('octocat').all()
self.assertEqual(request_method.call_args[0],
('get', _('users/octocat/following')))
- def test_LIST_FOLLOWING_with_user_in_service(self, request_method):
- request_method.return_value = mock_response_result()
- self.fs.set_user('octocat_service')
- self.fs.list_following().all()
- self.assertEqual(request_method.call_args[0],
- ('get', _('users/octocat_service/following')))
-
def test_IS_FOLLOWING(self, request_method):
self.fs.is_following('octocat')
self.assertEqual(request_method.call_args[0],