aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/tests/services/test_users.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygithub3/tests/services/test_users.py')
-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],