From c7152b99a6aed2bdc0f0c8d3b676511a2c498ce7 Mon Sep 17 00:00:00 2001 From: yucheng Date: Thu, 29 Oct 2026 16:37:52 -0700 Subject: [PATCH] test(logging): pin the failure-scrub test timestamps --- tests/unit/integrations/test_mlflow.py | 4 ++-- tests/unit/litellm_core_utils/test_litellm_logging.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/integrations/test_mlflow.py b/tests/unit/integrations/test_mlflow.py index 73fdd7e568b..992bcaf6e5b 100644 --- a/tests/unit/integrations/test_mlflow.py +++ b/tests/unit/integrations/test_mlflow.py @@ -311,8 +311,8 @@ def test_mlflow_failure_event_records_the_error_text_the_payload_logged(scrubbed }, }, response_obj=None, - start_time=datetime.now(), - end_time=datetime.now(), + start_time=datetime(2025, 1, 1), + end_time=datetime(2025, 1, 1), ) event = span.add_event.call_args.args[0] diff --git a/tests/unit/litellm_core_utils/test_litellm_logging.py b/tests/unit/litellm_core_utils/test_litellm_logging.py index f40d11d3b23..8bf7b9cf709 100644 --- a/tests/unit/litellm_core_utils/test_litellm_logging.py +++ b/tests/unit/litellm_core_utils/test_litellm_logging.py @@ -11675,7 +11675,7 @@ def _prompt_failure_logging_obj(litellm_params: Mapping[str, object] | None = No messages=[{"role": "user", "content": SCRUB_PROMPT}], stream=False, call_type="completion", - start_time=time.time(), + start_time=datetime.datetime(2025, 1, 1), litellm_call_id="failure-scrub", function_id="failure-scrub", )