summaryrefslogtreecommitdiff
path: root/gitlab/tests/test_gitlab.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/tests/test_gitlab.py')
-rw-r--r--gitlab/tests/test_gitlab.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/gitlab/tests/test_gitlab.py b/gitlab/tests/test_gitlab.py
index a0f35bb..8331964 100644
--- a/gitlab/tests/test_gitlab.py
+++ b/gitlab/tests/test_gitlab.py
@@ -677,15 +677,19 @@ class TestGitLab(unittest.TestCase):
self.assertEqual(data.id, 1)
def test_Issue(self):
- @urlmatch(scheme="http", netloc="localhost", path="/api/v3/issues/1",
+ @urlmatch(scheme="http", netloc="localhost", path="/api/v3/issues",
method="get")
def resp_get_issue(url, request):
headers = {'content-type': 'application/json'}
- content = '{"name": "name", "id": 1}'.encode("utf-8")
+ content = ('[{"name": "name", "id": 1}, '
+ '{"name": "other_name", "id": 2}]')
+ content = content.encode("utf-8")
return response(200, content, headers, None, 5, request)
with HTTMock(resp_get_issue):
- self.assertRaises(NotImplementedError, self.gl.Issue, id=1)
+ data = self.gl.Issue(id=2)
+ self.assertEqual(data.id, 2)
+ self.assertEqual(data.name, 'other_name')
def test_User(self):
@urlmatch(scheme="http", netloc="localhost", path="/api/v3/users/1",