summaryrefslogtreecommitdiff
path: root/gitlab/tests/test_gitlab.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2015-12-31 07:07:45 +0100
committerGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2015-12-31 07:07:45 +0100
commit1db3cc1e4f7e8f3bfae1f2e8cdbd377701789eb4 (patch)
tree70f2bd456f277c25cda2d4dddb43f70baf57b1fc /gitlab/tests/test_gitlab.py
parent2a76b7490ba3dc6de6080d2dab55be017c09db59 (diff)
downloadgitlab-1db3cc1e4f7e8f3bfae1f2e8cdbd377701789eb4.tar.gz
fix the tests
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",