Update proxy status code e2e expectations

Co-authored-by: ishaan-berri <ishaan-berri@users.noreply.github.com>
This commit is contained in:
oss-agent-shin 2026-05-07 21:22:06 +00:00
parent 998620e27e
commit ffd59f6c30
No known key found for this signature in database
3 changed files with 5 additions and 5 deletions

View file

@ -25,8 +25,8 @@ async def make_calls_until_budget_exceeded(session, key: str, call_function, **k
# Check error structure and values that should be consistent
assert (
error_dict["code"] == "400"
), f"Expected error code 400, got: {error_dict['code']}"
error_dict["code"] == "429"
), f"Expected error code 429, got: {error_dict['code']}"
assert (
error_dict["type"] == "budget_exceeded"
), f"Expected error type budget_exceeded, got: {error_dict['type']}"

View file

@ -99,7 +99,7 @@ async def test_model_access_patterns(key_models, test_model, expect_success):
# Assert error structure and values
assert _error_body["type"] == "key_model_access_denied"
assert _error_body["param"] == "model"
assert _error_body["code"] == "401"
assert _error_body["code"] == "403"
assert "key not allowed to access model" in _error_body["message"]
@ -297,7 +297,7 @@ def _validate_model_access_exception(
# Assert error structure and values
assert _error_body["type"] == expected_type
assert _error_body["param"] == "model"
assert _error_body["code"] == "401"
assert _error_body["code"] == "403"
if expected_type == "key_model_access_denied":
assert "key not allowed to access model" in _error_body["message"]
elif expected_type == "team_model_access_denied":

View file

@ -303,7 +303,7 @@ async def test_chat_completion():
api_key=key_gen["key"],
api_version="2024-02-15-preview",
)
with pytest.raises(openai.AuthenticationError) as e:
with pytest.raises(openai.PermissionDeniedError) as e:
response = await azure_client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "Hello!"}],