Skip to content

Commit ae5db34

Browse files
committed
fix: remove dead page_size clamp in client and add CI test file
1 parent c0a8ca0 commit ae5db34

3 files changed

Lines changed: 719 additions & 5 deletions

File tree

tools/src/aden_tools/tools/ninjapear_tool/ninjapear_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def get_company_customers(
164164
"""Get customers, investors, and partner companies for a target company."""
165165
params: dict[str, Any] = {
166166
"website": website,
167-
"page_size": min(max(page_size, 1), 200),
167+
"page_size": page_size,
168168
}
169169
if cursor:
170170
params["cursor"] = cursor

tools/src/aden_tools/tools/ninjapear_tool/tests/test_ninjapear_tool.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,11 @@ def test_get_company_customers_quality_filter_false(self, mock_get):
238238
assert params["quality_filter"] == "false"
239239

240240
@patch("aden_tools.tools.ninjapear_tool.ninjapear_tool.httpx.get")
241-
def test_get_company_customers_page_size_clamped(self, mock_get):
241+
def test_get_company_customers_page_size_forwarded(self, mock_get):
242242
mock_get.return_value = _make_response(200, {})
243-
# page_size > 200 should be clamped to 200 at the client level
244-
self.client.get_company_customers("stripe.com", page_size=500)
243+
self.client.get_company_customers("stripe.com", page_size=50)
245244
params = mock_get.call_args.kwargs["params"]
246-
assert params["page_size"] == 200
245+
assert params["page_size"] == 50
247246

248247
@patch("aden_tools.tools.ninjapear_tool.ninjapear_tool.httpx.get")
249248
def test_get_company_customers_cursor(self, mock_get):

0 commit comments

Comments
 (0)