mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
test: update testing
This commit is contained in:
parent
c2fbf74fb6
commit
f56eddec42
1 changed files with 11 additions and 0 deletions
|
@ -104,10 +104,20 @@ def test_mock_create_audio_file(mocker: MockerFixture, monkeypatch, llm_router:
|
||||||
Asserts 'create_file' is called with the correct arguments
|
Asserts 'create_file' is called with the correct arguments
|
||||||
"""
|
"""
|
||||||
from litellm import Router
|
from litellm import Router
|
||||||
|
from litellm.proxy.utils import ProxyLogging
|
||||||
|
|
||||||
mock_create_file = mocker.patch("litellm.files.main.create_file")
|
mock_create_file = mocker.patch("litellm.files.main.create_file")
|
||||||
|
|
||||||
|
proxy_logging_obj = ProxyLogging(
|
||||||
|
user_api_key_cache=DualCache(default_in_memory_ttl=1)
|
||||||
|
)
|
||||||
|
|
||||||
|
proxy_logging_obj._add_proxy_hooks(llm_router)
|
||||||
|
|
||||||
monkeypatch.setattr("litellm.proxy.proxy_server.llm_router", llm_router)
|
monkeypatch.setattr("litellm.proxy.proxy_server.llm_router", llm_router)
|
||||||
|
monkeypatch.setattr(
|
||||||
|
"litellm.proxy.proxy_server.proxy_logging_obj", proxy_logging_obj
|
||||||
|
)
|
||||||
|
|
||||||
# Create a simple test file content
|
# Create a simple test file content
|
||||||
test_file_content = b"test audio content"
|
test_file_content = b"test audio content"
|
||||||
|
@ -306,6 +316,7 @@ def test_create_file_and_call_chat_completion_e2e(
|
||||||
mock.stop()
|
mock.stop()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip(reason="function migrated to litellm/proxy/hooks/managed_files.py")
|
||||||
def test_create_file_for_each_model(
|
def test_create_file_for_each_model(
|
||||||
mocker: MockerFixture, monkeypatch, llm_router: Router
|
mocker: MockerFixture, monkeypatch, llm_router: Router
|
||||||
):
|
):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue