diff options
| author | Gauvain Pocentek <gauvain@pocentek.net> | 2016-08-13 16:50:14 +0200 |
|---|---|---|
| committer | Gauvain Pocentek <gauvain@pocentek.net> | 2016-08-13 16:53:35 +0200 |
| commit | 451c17492e1399e2359c761f1fb27982e6596696 (patch) | |
| tree | ac561efc6400f63dc13da108249668fa037cbbdd /gitlab/tests/test_gitlab.py | |
| parent | a8f6fdd43bba84270ec841eb019ea5c332d26e04 (diff) | |
| download | gitlab-451c17492e1399e2359c761f1fb27982e6596696.tar.gz | |
Remove _get_list_or_object() and its tests
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") |
