Skip to content

Commit

Permalink
add coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaan-jaff committed Nov 25, 2024
1 parent a18aeaa commit 632283a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/proxy_unit_tests/test_user_api_key_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,8 @@ def test_is_api_route_allowed(route, user_role, expected_result):
("custom_engine/model-123", ["custom_engine/*"], True),
("custom_engine/model-123", ["custom_engine/*", "azure/*"], True),
("custom-engine/model-123", ["custom_engine/*", "azure/*"], False),
("openai/gpt-4o", ["openai/*"], True),
("openai/gpt-12", ["openai/*"], True),
("gpt-4", ["gpt-*"], True),
("gpt-4", ["claude-*"], False),
# Mixed scenarios
Expand All @@ -430,6 +432,7 @@ def test_model_is_within_list_of_allowed_models(model, allowed_models, expected_
("gpt-4", ["gpt-*"], True),
("azure/gpt-4", ["azure/*"], True),
("custom_engine/model-123", ["custom_engine/*"], True),
("openai/my-fake-model", ["openai/*"], True),
("custom_engine/model-123", ["custom_engine/*", "azure/*"], True),
("custom-engine/model-123", ["custom_engine/*", "azure/*"], False),
# Multiple patterns
Expand Down

0 comments on commit 632283a

Please sign in to comment.