test(reports): add ReportEngine unit tests [FASE-2.1]

Stub WeasyPrint for CI-friendly PDF generation and verify HTML render, PDF path, and HTML file output.
This commit is contained in:
2026-05-18 14:00:37 +02:00
parent 0d4c404f08
commit c28a47c43b
2 changed files with 67 additions and 0 deletions

View File

@@ -76,6 +76,10 @@ class ReportEngine:
logger.info("DOCX generated: %s", output_path)
return output_path
def generate_html(self, template_name: str, context: dict) -> str:
"""Render and save a standalone HTML report (alias for spec compatibility)."""
return self.generate_html_file(template_name, context)
def generate_html_file(self, template_name: str, context: dict) -> str:
"""Render and save a standalone HTML report."""
html_content = self.render_html(template_name, context)