mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-28 06:23:07 +00:00
test: configure prompt storage without mocking internals
This commit is contained in:
parent
13ea8be031
commit
c652c0dfec
1 changed files with 5 additions and 5 deletions
|
|
@ -2421,15 +2421,15 @@ def test_proxy_server_request_payload_excludes_secret_fields(mock_should_store):
|
|||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize("redact", [False, True], ids=["stored", "redacted"])
|
||||
@patch(
|
||||
"litellm.proxy.spend_tracking.spend_tracking_utils.should_store_prompts_and_responses_in_spend_logs",
|
||||
return_value=True,
|
||||
)
|
||||
async def test_websocket_snapshot_spend_serialization_preserves_transport(_mock_should_store, redact):
|
||||
async def test_websocket_snapshot_spend_serialization_preserves_transport(
|
||||
monkeypatch: pytest.MonkeyPatch, redact: bool
|
||||
) -> None:
|
||||
from starlette.websockets import WebSocket
|
||||
|
||||
from litellm.proxy.litellm_pre_call_utils import refresh_proxy_server_request_body_snapshot
|
||||
|
||||
monkeypatch.setenv("STORE_PROMPTS_IN_SPEND_LOGS", "true")
|
||||
|
||||
class AppTraversalTrap:
|
||||
@property
|
||||
def __dict__(self):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue