@@ -205,7 +205,7 @@ def resp_2(url, request):
205
205
return response (200 , content , headers , None , 5 , request )
206
206
207
207
with HTTMock (resp_1 ):
208
- obj = self .gl .http_list ('/tests' )
208
+ obj = self .gl .http_list ('/tests' , as_list = False )
209
209
self .assertEqual (len (obj ), 2 )
210
210
self .assertEqual (obj ._next_url ,
211
211
'http://localhost/api/v4/tests?per_page=1&page=2' )
@@ -311,7 +311,12 @@ def resp_cont(url, request):
311
311
return response (200 , content , headers , None , 5 , request )
312
312
313
313
with HTTMock (resp_cont ):
314
- result = self .gl .http_list ('/projects' )
314
+ result = self .gl .http_list ('/projects' , as_list = True )
315
+ self .assertIsInstance (result , list )
316
+ self .assertEqual (len (result ), 1 )
317
+
318
+ with HTTMock (resp_cont ):
319
+ result = self .gl .http_list ('/projects' , as_list = False )
315
320
self .assertIsInstance (result , GitlabList )
316
321
self .assertEqual (len (result ), 1 )
317
322
@@ -324,7 +329,7 @@ def test_list_request_404(self):
324
329
@urlmatch (scheme = "http" , netloc = "localhost" ,
325
330
path = "/api/v4/not_there" , method = "get" )
326
331
def resp_cont (url , request ):
327
- content = {'Here is wh it failed' }
332
+ content = {'Here is why it failed' }
328
333
return response (404 , content , {}, None , 5 , request )
329
334
330
335
with HTTMock (resp_cont ):
0 commit comments