test(files): assert key_model_access_denied error type instead of message text

main (15f2e25e8a) replaced the configurable model-access-denied message
with a fixed client message, so match on the stable error type.
This commit is contained in:
mubashir1osmani 2026-09-17 15:39:07 -04:00
parent 9066a32363
commit d2af0577d5

View file

@ -5357,7 +5357,7 @@ def test_model_routed_file_ops_reject_key_without_model_grant(
app.dependency_overrides.pop(ps.user_api_key_auth, None)
assert response.status_code == 403, response.text
assert "not allowed to access model" in response.text
assert response.json()["error"]["type"] == "key_model_access_denied"
upstream.assert_not_called()