chore: initial snapshot of tubco people portal
This commit is contained in:
18
backend/workflows/tests/test_pdf_smoke.py
Normal file
18
backend/workflows/tests/test_pdf_smoke.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from pathlib import Path
|
||||
|
||||
from django.test import SimpleTestCase
|
||||
|
||||
from workflows.tasks import _generate_content_pdf
|
||||
|
||||
|
||||
class PdfSmokeTests(SimpleTestCase):
|
||||
def test_generate_content_pdf_creates_nonempty_file(self):
|
||||
output_pdf = Path('/tmp/pdf_smoke_output.pdf')
|
||||
html = '<html><body><h1>PDF Smoke</h1><p>This is a smoke test.</p></body></html>'
|
||||
|
||||
try:
|
||||
_generate_content_pdf(html, output_pdf)
|
||||
self.assertTrue(output_pdf.exists())
|
||||
self.assertGreater(output_pdf.stat().st_size, 100)
|
||||
finally:
|
||||
output_pdf.unlink(missing_ok=True)
|
||||
Reference in New Issue
Block a user