mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
test(test_custom_callback_input.py): fix test
This commit is contained in:
parent
25820680eb
commit
cf4574dd65
1 changed files with 5 additions and 3 deletions
|
@ -1254,12 +1254,10 @@ def test_standard_logging_payload(model, turn_off_message_logging):
|
||||||
assert "redacted-by-litellm" == slobject["messages"][0]["content"]
|
assert "redacted-by-litellm" == slobject["messages"][0]["content"]
|
||||||
|
|
||||||
|
|
||||||
def test_standard_logging_payload_cache_hit():
|
def test_aaastandard_logging_payload_cache_hit():
|
||||||
from litellm.types.utils import StandardLoggingPayload
|
from litellm.types.utils import StandardLoggingPayload
|
||||||
|
|
||||||
# sync completion
|
# sync completion
|
||||||
customHandler = CompletionCustomHandler()
|
|
||||||
litellm.callbacks = [customHandler]
|
|
||||||
|
|
||||||
litellm.cache = Cache()
|
litellm.cache = Cache()
|
||||||
|
|
||||||
|
@ -1269,6 +1267,10 @@ def test_standard_logging_payload_cache_hit():
|
||||||
caching=True,
|
caching=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
customHandler = CompletionCustomHandler()
|
||||||
|
litellm.callbacks = [customHandler]
|
||||||
|
litellm.success_callback = []
|
||||||
|
|
||||||
with patch.object(
|
with patch.object(
|
||||||
customHandler, "log_success_event", new=MagicMock()
|
customHandler, "log_success_event", new=MagicMock()
|
||||||
) as mock_client:
|
) as mock_client:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue