Initial roborto accounting implementation

This commit is contained in:
rob
2026-08-30 07:16:21 +01:00
commit 97a75d0243
145 changed files with 5525 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
from roborto_accounting.reporting.documents.theme import DocumentTheme
from reportlab.platypus import Paragraph
def test_shared_theme_generates_deterministic_a4_pdf(tmp_path):
logo=__import__("pathlib").Path("assets/branding/logo-light.svg")
theme=DocumentTheme(logo);story=theme.header(["accounts@roborto.net"])+theme.heading("INVOICE")
story.append(Paragraph("Correct accounting content",theme.body))
first=theme.build(tmp_path/"first.pdf",story)
story2=theme.header(["accounts@roborto.net"])+theme.heading("INVOICE")+[Paragraph("Correct accounting content",theme.body)]
second=theme.build(tmp_path/"second.pdf",story2)
assert first.read_bytes().startswith(b"%PDF") and first.read_bytes()==second.read_bytes()