test: update stale MCP call_tool and usage card assertions, add timeout headroom to request-log index boot test (#45523)

Co-authored-by: yuneng <yuneng@berri.ai>
This commit is contained in:
devin-ai-integration[bot] 2026-10-08 23:44:46 -07:00 • committed by GitHub
parent 145d382089
commit 5c6ea040b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 2 deletions

View file

@ -20,9 +20,13 @@ import {
* traffic, so each assertion is scoped to a key this test minted and to the requests it sent.
*/
const escapeRegExp = (value: string): string => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
/** Each breakdown renders one expandable card per entity, named "<entity> $x.xx N requests". */
const entityCard = (page: PlaywrightPage, tab: string, name: string): Locator =>
page.getByRole("tabpanel", { name: tab }).getByRole("button", { name: new RegExp(`^${name}\\s`) });
page
.getByRole("tabpanel", { name: tab })
.getByRole("button", { name: new RegExp(`(?:^|\\s)${escapeRegExp(name)}\\s`) });
async function openUsageTab(page: PlaywrightPage, tab: string): Promise<Locator> {
await navigateToPage(page, Page.NewUsage);

View file

@ -17,6 +17,8 @@ from integration._support.process import LEGACY_MIGRATE_DEPLOY, MIGRATE_DEPLOY,
from psycopg import sql
from psycopg.rows import class_row
pytestmark: Final = pytest.mark.timeout(240)
REPO_ROOT: Final = Path(__file__).resolve().parents[3]
PRISMA_DIR: Final = REPO_ROOT / "litellm-proxy-extras" / "litellm_proxy_extras"
PARTITION_SCRIPT: Final = REPO_ROOT / "db_scripts" / "partition_spend_logs.sql"

View file

@ -314,7 +314,12 @@ class TestMCPClientUnitTests:
assert result == mock_result
mock_session_instance.initialize.assert_called_once()
mock_session_instance.call_tool.assert_called_once_with(
name="test_tool", arguments={"arg1": "value1"}, progress_callback=ANY, allow_input_required=False
name="test_tool",
arguments={"arg1": "value1"},
input_responses=None,
request_state=None,
progress_callback=ANY,
allow_input_required=True,
)