@@ -73,17 +73,28 @@ def test_show_not_found(
7373 mock_context , transfer_id , id )
7474 mock_single .assert_not_called ()
7575
76+ @mock .patch ("coriolis.api.common.get_paging_params" )
77+ @mock .patch ("coriolis.api.common.get_sort_params" )
7678 @mock .patch .object (transfer_tasks_execution_view , 'collection' )
7779 @mock .patch .object (api .API , 'get_executions' )
7880 def test_index (
7981 self ,
8082 mock_get_executions ,
81- mock_collection
83+ mock_collection ,
84+ mock_get_sort_params ,
85+ mock_get_paging_params ,
8286 ):
8387 mock_req = mock .Mock ()
8488 mock_context = mock .Mock ()
8589 mock_req .environ = {'coriolis.context' : mock_context }
8690 transfer_id = mock .sentinel .transfer_id
91+ mock_get_sort_params .return_value = (
92+ mock .sentinel .sort_keys ,
93+ mock .sentinel .sort_dirs )
94+ mock_get_paging_params .return_value = (
95+ mock .sentinel .marker ,
96+ mock .sentinel .limit ,
97+ )
8798
8899 result = self .transfer_api .index (mock_req , transfer_id )
89100
@@ -95,7 +106,12 @@ def test_index(
95106 mock_context .can .assert_called_once_with (
96107 "migration:transfer_executions:list" )
97108 mock_get_executions .assert_called_once_with (
98- mock_context , transfer_id , include_tasks = False )
109+ mock_context , transfer_id , include_tasks = False ,
110+ marker = mock .sentinel .marker ,
111+ limit = mock .sentinel .limit ,
112+ sort_keys = mock .sentinel .sort_keys ,
113+ sort_dirs = mock .sentinel .sort_dirs ,
114+ )
99115 mock_collection .assert_called_once_with (
100116 mock_get_executions .return_value )
101117
0 commit comments