From 655e492a130666e934922ec344ccbf30953098c1 Mon Sep 17 00:00:00 2001 From: souplearn Date: Sat, 25 Jul 2026 22:23:44 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E4=BF=AE=E5=A4=8D=E6=8A=A5=E5=B7=A5?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=BD=92=E5=B1=9E=E6=B5=8B=E8=AF=95=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_report_allocations.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_report_allocations.py b/tests/test_report_allocations.py index 8b3cbe4..29cf835 100644 --- a/tests/test_report_allocations.py +++ b/tests/test_report_allocations.py @@ -35,6 +35,7 @@ from app.schemas import ( ReportSubmitRequest, ) from app.services import auto_submit as auto_submit_service +from app.services import reporting_window as reporting_window_service from app.services.report_lifecycle import purge_expired_voided_reports from app.services.metrics import calculate_report_metrics from app.services.report_allocations import ( @@ -896,6 +897,7 @@ def test_submit_report_creates_allocations(monkeypatch): db.add_all([session, _press_equipment(), _product()]) db.commit() monkeypatch.setattr(reports_router, "report_out", lambda report, schedule=None: report) + monkeypatch.setattr(reporting_window_service, "now", lambda: datetime(2026, 7, 25, 11, 5)) report = reports_router.submit_report( ReportSubmitRequest(