mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-23 05:34:41 +00:00
test(router): avoid real clock in fallback tests
Some checks failed
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (push) Has been cancelled
Terraform Modules / fmt, validate, test (aws) (push) Has been cancelled
Terraform Modules / fmt, validate, test (gcp) (push) Has been cancelled
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled
Some checks failed
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (push) Has been cancelled
Terraform Modules / fmt, validate, test (aws) (push) Has been cancelled
Terraform Modules / fmt, validate, test (gcp) (push) Has been cancelled
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
3da3e194d6
commit
5d7a1b8b28
1 changed files with 3 additions and 3 deletions
|
|
@ -152,7 +152,7 @@ def _request_logging_obj() -> Logging:
|
|||
messages=[{"role": "user", "content": "ping"}],
|
||||
stream=True,
|
||||
call_type="anthropic_messages",
|
||||
start_time=datetime.now(),
|
||||
start_time=datetime(2026, 1, 1),
|
||||
litellm_call_id="fallback-hop",
|
||||
function_id="fallback-hop",
|
||||
)
|
||||
|
|
@ -176,7 +176,7 @@ class HopLoggingItsOwnSuccessRouter(FakeRouter):
|
|||
choices=[Choices(index=0, message=Message(role="assistant", content="served by the hop"))],
|
||||
usage=Usage(prompt_tokens=52, completion_tokens=7, total_tokens=59),
|
||||
)
|
||||
now = datetime.now()
|
||||
now = datetime(2026, 1, 1)
|
||||
await kwargs["litellm_logging_obj"].async_success_handler(result=hop_response, start_time=now, end_time=now)
|
||||
return StreamingWrapper()
|
||||
|
||||
|
|
@ -191,7 +191,7 @@ async def test_run_async_fallback_opens_the_hop_without_the_superseded_attempts_
|
|||
messages=[{"role": "user", "content": "ping"}],
|
||||
stream=False,
|
||||
call_type="completion",
|
||||
start_time=datetime.now(),
|
||||
start_time=datetime(2026, 1, 1),
|
||||
litellm_call_id="fallback-hop-success",
|
||||
function_id="fallback-hop-success",
|
||||
dynamic_async_success_callbacks=[recorder],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue