feat: Engine+Schema fuer Szenario-Ende und szenario-eigene Einmalzahlungen
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,3 +22,15 @@ def test_account_transaction_roundtrip(db):
|
||||
db.add(tx)
|
||||
db.commit()
|
||||
assert db.query(Transaction).one().amount == Decimal("-50.00")
|
||||
|
||||
|
||||
def test_scenario_planned_item_roundtrip(db):
|
||||
from app.models.tables import Scenario, ScenarioPlannedItem
|
||||
sc = Scenario(name="SPI-Test", description="")
|
||||
db.add(sc)
|
||||
db.flush()
|
||||
db.add(ScenarioPlannedItem(scenario_id=sc.id, name="Einmalzahlung",
|
||||
amount=Decimal("5000.00"), due=date(2026, 7, 30)))
|
||||
db.commit()
|
||||
item = db.query(ScenarioPlannedItem).one()
|
||||
assert item.amount == Decimal("5000.00") and item.scenario_id == sc.id
|
||||
|
||||
Reference in New Issue
Block a user