dodil/erp-brick-gl
DODIL ERP brick: general ledger
tests/test_smoke.py
from conftest import ACCOUNTANT, api, must
from world import books, invoice
def test_books_and_one_invoice():
books()
s, b = invoice()
assert s == 200, b
assert b["status"] == "posted" and b["replay"] is False and b["entry_no"] == 1
s2, b2 = invoice()
assert s2 == 200 and b2["replay"] is True and b2["journal_id"] == b["journal_id"]
tb = must(api("GET", "/reports/trial-balance", ACCOUNTANT, {"as_at": "2026-10-22"}))
assert str(tb["difference"]) in ("0", "0.00"), tb
assert tb["total_debit"] == "1200.00"