From b161fbf8d2e099993a203cc2632ad12cfbdba389 Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2026 00:33:57 +0000 Subject: [PATCH] test(integration): assert team model visibility follows caller scope (#50772) Co-authored-by: mateo <277851410+mateo-berri@users.noreply.github.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- tests/integration/authorization/test_team_scoped_models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/integration/authorization/test_team_scoped_models.py b/tests/integration/authorization/test_team_scoped_models.py index 8f8e12ae498..433a9e34e04 100644 --- a/tests/integration/authorization/test_team_scoped_models.py +++ b/tests/integration/authorization/test_team_scoped_models.py @@ -137,12 +137,13 @@ def _v2_team_public_names(gateway: Gateway, key: str, model: str) -> list[JsonVa return [entry["model_info"].get("team_public_model_name") for entry in response.json()["data"]] -def test_v2_model_info_reports_a_team_model_to_team_and_non_team_keys(gateway: Gateway) -> None: +def test_v2_model_info_reports_a_team_model_only_to_team_and_admin_keys(gateway: Gateway) -> None: with gateway.scenario() as scenario: team: Final = scenario.team(models=[]) model: Final = scenario.model(model_info={"team_id": team}) assert _v2_team_public_names(gateway, scenario.key(team_id=team), model) == [model] - assert _v2_team_public_names(gateway, scenario.key(), model) == [model] + assert _v2_team_public_names(gateway, scenario.key(), model) == [] + assert _v2_team_public_names(gateway, gateway.key, model) == [model] @pytest.mark.parametrize("set_on", ["team_new", "team_update"])