@@ -68,7 +68,7 @@ async def test_list_pipelines_default_params(self) -> None:
6868 # Create client with predefined response
6969 client = DummyClient (
7070 responses = {
71- "test-workspace/pipelines?page_number=1&limit=10 " : {
71+ "test-workspace/pipelines" : {
7272 "data" : sample_pipelines ,
7373 "has_more" : False ,
7474 "total" : 2 ,
@@ -88,8 +88,9 @@ async def test_list_pipelines_default_params(self) -> None:
8888
8989 # Verify request
9090 assert len (client .requests ) == 1
91- assert client .requests [0 ]["endpoint" ] == "v1/workspaces/test-workspace/pipelines?page_number=1&limit=10 "
91+ assert client .requests [0 ]["endpoint" ] == "v1/workspaces/test-workspace/pipelines"
9292 assert client .requests [0 ]["method" ] == "GET"
93+ assert client .requests [0 ]["params" ] == {"page_number" : 1 , "limit" : 10 }
9394
9495 @pytest .mark .asyncio
9596 async def test_list_pipelines_with_pagination (self ) -> None :
@@ -103,7 +104,7 @@ async def test_list_pipelines_with_pagination(self) -> None:
103104 # Create client with predefined response
104105 client = DummyClient (
105106 responses = {
106- "test-workspace/pipelines?page_number=2&limit=5 " : {
107+ "test-workspace/pipelines" : {
107108 "data" : sample_pipelines ,
108109 "has_more" : False ,
109110 "total" : 10 ,
@@ -121,15 +122,14 @@ async def test_list_pipelines_with_pagination(self) -> None:
121122 assert result [1 ].id == "4"
122123
123124 # Verify request
124- assert client .requests [0 ]["endpoint" ] == "v1/workspaces/test-workspace/pipelines?page_number=2&limit=5"
125+ assert client .requests [0 ]["endpoint" ] == "v1/workspaces/test-workspace/pipelines"
126+ assert client .requests [0 ]["params" ] == {"page_number" : 2 , "limit" : 5 }
125127
126128 @pytest .mark .asyncio
127129 async def test_list_pipelines_empty_result (self ) -> None :
128130 """Test listing pipelines when there are no pipelines."""
129131 # Create client with empty response
130- client = DummyClient (
131- responses = {"test-workspace/pipelines?page_number=1&limit=10" : {"data" : [], "has_more" : False , "total" : 0 }}
132- )
132+ client = DummyClient (responses = {"test-workspace/pipelines" : {"data" : [], "has_more" : False , "total" : 0 }})
133133
134134 # Create resource and call list method
135135 resource = PipelineResource (client = client , workspace = "test-workspace" )
@@ -142,7 +142,7 @@ async def test_list_pipelines_empty_result(self) -> None:
142142 async def test_list_pipelines_error (self ) -> None :
143143 """Test handling of errors when listing pipelines."""
144144 # Create client that raises an exception
145- client = DummyClient (responses = {"test-workspace/pipelines?page_number=1&limit=10 " : ValueError ("API Error" )})
145+ client = DummyClient (responses = {"test-workspace/pipelines" : ValueError ("API Error" )})
146146
147147 # Create resource
148148 resource = PipelineResource (client = client , workspace = "test-workspace" )
@@ -155,9 +155,7 @@ async def test_list_pipelines_error(self) -> None:
155155 async def test_list_pipelines_with_zero_limit (self ) -> None :
156156 """Test listing pipelines with a limit of zero (edge case)."""
157157 # Create client
158- client = DummyClient (
159- responses = {"test-workspace/pipelines?page_number=1&limit=0" : {"data" : [], "has_more" : False , "total" : 10 }}
160- )
158+ client = DummyClient (responses = {"test-workspace/pipelines" : {"data" : [], "has_more" : False , "total" : 10 }})
161159
162160 # Create resource and call list method with limit=0
163161 resource = PipelineResource (client = client , workspace = "test-workspace" )
@@ -167,7 +165,8 @@ async def test_list_pipelines_with_zero_limit(self) -> None:
167165 assert len (result ) == 0
168166
169167 # Verify request
170- assert client .requests [0 ]["endpoint" ] == "v1/workspaces/test-workspace/pipelines?page_number=1&limit=0"
168+ assert client .requests [0 ]["endpoint" ] == "v1/workspaces/test-workspace/pipelines"
169+ assert client .requests [0 ]["params" ] == {"page_number" : 1 , "limit" : 0 }
171170
172171 @pytest .mark .asyncio
173172 async def test_get_pipeline_with_yaml (self ) -> None :
0 commit comments