Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Commit 3ef8146

Browse files
tests: small fixes based on PR comments
1 parent 4d17e1c commit 3ef8146

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tests/conftest.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -209,14 +209,13 @@ def make_request(
209209
) -> Response:
210210
"""request wrapper for pagination tests"""
211211

212-
# extract pagination token
213-
if next_token and method == "GET":
214-
next_token = next_token.split("next=")[1]
215-
params = {"next": next_token, "limit": limit}
216-
217-
if method == "GET":
218-
res = stapi_client.get(endpoint, params=params)
219-
if method == "POST":
220-
res = stapi_client.post(endpoint, json=body)
212+
match method:
213+
case "GET":
214+
if next_token: # extract pagination token
215+
next_token = next_token.split("next=")[1]
216+
params = {"next": next_token, "limit": limit}
217+
res = stapi_client.get(endpoint, params=params)
218+
case "POST":
219+
res = stapi_client.post(endpoint, json=body)
221220

222221
return res

0 commit comments

Comments
 (0)