mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
fixing container tests
This commit is contained in:
parent
4fe221115f
commit
5bd8f4af91
1 changed files with 10 additions and 1 deletions
|
|
@ -385,6 +385,15 @@ class TestContainerIntegration:
|
|||
@pytest.mark.parametrize("provider", ["openai"])
|
||||
def test_provider_support(self, provider):
|
||||
"""Test that the container API works with supported providers."""
|
||||
import importlib
|
||||
import litellm.containers.main as containers_main_module
|
||||
|
||||
# Reload the module to ensure it has a fresh reference to base_llm_http_handler
|
||||
# after conftest reloads litellm (same pattern as test_error_handling_integration)
|
||||
importlib.reload(containers_main_module)
|
||||
|
||||
from litellm.containers.main import create_container as create_container_fresh
|
||||
|
||||
mock_response = ContainerObject(
|
||||
id="cntr_provider_test",
|
||||
object="container",
|
||||
|
|
@ -398,7 +407,7 @@ class TestContainerIntegration:
|
|||
with patch('litellm.containers.main.base_llm_http_handler') as mock_handler:
|
||||
mock_handler.container_create_handler.return_value = mock_response
|
||||
|
||||
response = create_container(
|
||||
response = create_container_fresh(
|
||||
name="Provider Test Container",
|
||||
custom_llm_provider=provider
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue