test: 修复报工提交归属测试时间窗口
This commit is contained in:
parent
00dd4f93b5
commit
655e492a13
@ -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(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user