@@ -330,7 +330,7 @@ def test_library_object_serialization_deserialization():
330330
331331def test_list (pipelines_api ):
332332 client_mock = pipelines_api .client .client .perform_query
333- client_mock .side_effect = [{"statuses" : [], "pagination" : {} }]
333+ client_mock .side_effect = [{"statuses" : []}]
334334
335335 pipelines_api .list ()
336336 assert client_mock .call_count == 1
@@ -341,13 +341,13 @@ def test_list(pipelines_api):
341341
342342def test_list_with_page_token (pipelines_api ):
343343 client_mock = pipelines_api .client .client .perform_query
344- client_mock .side_effect = [{"statuses" : [], "pagination" : { " next_page_token" : "a" } },
345- {"statuses" : [], "pagination" : {} }]
344+ client_mock .side_effect = [{"statuses" : [], "next_page_token" : "a" },
345+ {"statuses" : []}]
346346
347347 pipelines_api .list ()
348348 assert client_mock .call_count == 2
349349 client_mock .assert_called_with ('GET' , '/pipelines' ,
350- data = {"pagination. page_token" : "a" }, headers = None )
350+ data = {"page_token" : "a" }, headers = None )
351351
352352
353353def test_list_with_paginated_responses (pipelines_api ):
@@ -363,7 +363,7 @@ def test_list_with_paginated_responses(pipelines_api):
363363 'cluster_id' : '1024-160918-tees475' ,
364364 'name' : 'Wiki Pipeline' ,
365365 'health' : 'HEALTHY' }],
366- 'pagination' : { ' next_page_token' : 'page2' }
366+ 'next_page_token' : 'page2'
367367 },
368368 {'statuses' : [{'pipeline_id' : '3' ,
369369 'state' : 'RUNNING' ,
@@ -375,9 +375,8 @@ def test_list_with_paginated_responses(pipelines_api):
375375 'cluster_id' : '1023-093505-corm4' ,
376376 'name' : 'Jira Automation Staging' ,
377377 'health' : 'HEALTHY' }],
378- 'pagination' : {
379- 'next_page_token' : 'page3' ,
380- 'prev_page_token' : 'page2' }
378+ 'next_page_token' : 'page3' ,
379+ 'prev_page_token' : 'page2'
381380 },
382381 {'statuses' : [{'pipeline_id' : '5' ,
383382 'state' : 'FAILED' ,
@@ -389,8 +388,7 @@ def test_list_with_paginated_responses(pipelines_api):
389388 'cluster_id' : '1027-061023-clasp844' ,
390389 'name' : 'Pipeline Demo NYCTaxi' ,
391390 'health' : 'HEALTHY' }],
392- 'pagination' : {
393- 'prev_page_token' : 'page3' }
391+ 'prev_page_token' : 'page3'
394392 }
395393 ]
396394
@@ -403,10 +401,10 @@ def test_list_with_paginated_responses(pipelines_api):
403401 data = {},
404402 headers = None ),
405403 mock .call ('GET' , '/pipelines' ,
406- data = {"pagination. page_token" : "page2" },
404+ data = {"page_token" : "page2" },
407405 headers = None ),
408406 mock .call ('GET' , '/pipelines' ,
409- data = {"pagination. page_token" : "page3" },
407+ data = {"page_token" : "page3" },
410408 headers = None )
411409 ], any_order = False )
412410
@@ -426,7 +424,7 @@ def test_list_with_no_returned_pipelines(pipelines_api):
426424 'cluster_id' : '1024-160918-tees475' ,
427425 'name' : 'Wiki Pipeline' ,
428426 'health' : 'HEALTHY' }],
429- 'pagination' : { ' next_page_token' : 'page2' }
427+ 'next_page_token' : 'page2'
430428 },
431429 {}
432430 ]
@@ -440,7 +438,7 @@ def test_list_with_no_returned_pipelines(pipelines_api):
440438 data = {},
441439 headers = None ),
442440 mock .call ('GET' , '/pipelines' ,
443- data = {"pagination. page_token" : "page2" },
441+ data = {"page_token" : "page2" },
444442 headers = None )
445443 ], any_order = False )
446444
0 commit comments