style(model hub): fix lint and format in custom metadata tests

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
jesus 2026-10-20 01:34:43 +00:00
parent a522e07732
commit 688188c55a
2 changed files with 9 additions and 5 deletions

View file

@ -15,7 +15,6 @@ from litellm.types.guardrails import GuardrailEventHooks
from unittest.mock import AsyncMock, MagicMock, patch
import litellm
from litellm.router import Router
from litellm.proxy._types import LitellmUserRoles, UserAPIKeyAuth
from litellm.proxy.auth.auth_utils import (
check_complete_credentials,
@ -25,6 +24,7 @@ from litellm.proxy.litellm_pre_call_utils import (
get_dynamic_logging_metadata,
add_litellm_data_to_request,
)
from litellm.router import Router
from pydantic import ValidationError
pytestmark = pytest.mark.xdist_group("proxy_heavy")
@ -1679,7 +1679,6 @@ def test_get_model_group_info_merges_custom_tags_and_metadata_across_deployments
assert (group.custom_tags, group.custom_metadata) == (expected_tags, expected_metadata)
@pytest.mark.parametrize(
"alias_target",
[pytest.param("gpt-4", id="string"), pytest.param({"model": "gpt-4", "hidden": False}, id="item")],
@ -1706,6 +1705,7 @@ def test_get_model_group_info_serves_the_target_groups_custom_fields_on_an_alias
model_group: (("deprecated",), {"retirement_date": "2027-03-01"}) for model_group in ("gpt-4", "gpt-alias")
}
@pytest.fixture
def mock_team_data():
return [

View file

@ -13,9 +13,13 @@ describe("ModelCustomMetadata", () => {
expect(screen.getByText("Tags:")).toBeInTheDocument();
expect(screen.getByText("deprecated")).toBeInTheDocument();
expect(screen.getByText("ptu")).toBeInTheDocument();
expect(screen.getByText("retirement_date").nextElementSibling).toHaveTextContent("2027-03-01");
expect(screen.getByText("provisioned_ptu").nextElementSibling).toHaveTextContent("100");
expect(screen.getByText("gsu").nextElementSibling).toHaveTextContent("false");
const terms = screen.getAllByRole("term").map((term) => term.textContent);
const definitions = screen.getAllByRole("definition").map((definition) => definition.textContent);
expect(terms.map((term, index) => [term, definitions[index]])).toEqual([
["retirement_date", "2027-03-01"],
["provisioned_ptu", "100"],
["gsu", "false"],
]);
});
it("renders nothing when the model has no tags or metadata", () => {