Skip to content

Commit

Permalink
Add test asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
epandurski committed Oct 13, 2023
1 parent 65f687c commit 24ceea3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ def test_scan_accounts(app, db_session, current_ts):
data2.principal = 1000
data2.ledger_latest_update_ts = current_ts - timedelta(days=60)
data2.last_config_ts = current_ts - timedelta(days=1000)
data2_creation_date = data2.creation_date

data3 = m.AccountData.query.filter_by(debtor_id=3).one()
data3.last_transfer_number = 1
Expand Down Expand Up @@ -291,6 +292,14 @@ def test_scan_accounts(app, db_session, current_ts):
assert le.principal == 1000
assert le.added_at >= current_ts

uls = m.UpdatedLedgerSignal.query.one()
assert uls.creditor_id == C_ID
assert uls.debtor_id == 2
assert uls.creation_date == data2_creation_date
assert uls.principal == 1000
assert uls.last_transfer_number == 0
assert isinstance(uls.ts, date)

data2 = m.AccountData.query.filter_by(debtor_id=2).one()

ple = m.PendingLogEntry.query.filter_by(
Expand Down

0 comments on commit 24ceea3

Please sign in to comment.