diff options
Diffstat (limited to 'gitlab/tests/test_gitlab.py')
-rw-r--r-- | gitlab/tests/test_gitlab.py | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/gitlab/tests/test_gitlab.py b/gitlab/tests/test_gitlab.py index c32a561..4adf07f 100644 --- a/gitlab/tests/test_gitlab.py +++ b/gitlab/tests/test_gitlab.py @@ -625,34 +625,6 @@ class TestGitlab(unittest.TestCase): self.assertEqual(self.gl.user.id, id_) self.assertEqual(type(self.gl.user), CurrentUser) - def test_get_list_or_object_without_id(self): - @urlmatch(scheme="http", netloc="localhost", path="/api/v3/projects", - method="get") - def resp_cont(url, request): - headers = {'content-type': 'application/json'} - content = '[{"name": "testproject", "id": 1}]'.encode("utf-8") - return response(200, content, headers, None, 5, request) - - with HTTMock(resp_cont): - projs = Project._get_list_or_object(self.gl, None) - self.assertEqual(len(projs), 1) - proj = projs[0] - self.assertEqual(proj.id, 1) - self.assertEqual(proj.name, "testproject") - - def test_get_list_or_object_with_id(self): - @urlmatch(scheme="http", netloc="localhost", path="/api/v3/projects/1", - method="get") - def resp_cont(url, request): - headers = {'content-type': 'application/json'} - content = '{"name": "testproject", "id": 1}'.encode("utf-8") - return response(200, content, headers, None, 5, request) - - with HTTMock(resp_cont): - proj = Project._get_list_or_object(self.gl, 1) - self.assertEqual(proj.id, 1) - self.assertEqual(proj.name, "testproject") - def test_hooks(self): @urlmatch(scheme="http", netloc="localhost", path="/api/v3/hooks/1", method="get") |