mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
test: isolate anthropic missing-api-key case from env creds
Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
This commit is contained in:
parent
d7c419bfee
commit
58fd3ea5a8
1 changed files with 6 additions and 5 deletions
|
|
@ -337,11 +337,12 @@ class TestAnthropicFilesHandler:
|
|||
}
|
||||
|
||||
with patch.object(handler.anthropic_model_info, "get_api_key", return_value=None):
|
||||
with pytest.raises(ValueError, match="Missing Anthropic API Key"):
|
||||
await handler.afile_content(
|
||||
file_content_request=file_content_request,
|
||||
api_key=None
|
||||
)
|
||||
with patch.object(handler.anthropic_model_info, "get_auth_header", return_value=None):
|
||||
with pytest.raises(ValueError, match="Missing Anthropic API Key"):
|
||||
await handler.afile_content(
|
||||
file_content_request=file_content_request,
|
||||
api_key=None
|
||||
)
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_afile_content_missing_file_id(self, handler):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue