Skip to content

Commit

Permalink
migrate mpma.py tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ouziel committed Jan 24, 2025
1 parent 79eb7d5 commit 3e9f8b0
Show file tree
Hide file tree
Showing 2 changed files with 754 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def check_record(ledger_db, record):
conditions.append(f"{field} = ?")
bindings.append(record["values"][field])
sql += " AND ".join(conditions)
print("sql", sql, "bindings", bindings)
count = cursor.execute(sql, tuple(bindings)).fetchone()["count"]
ok = (record.get("not", False) and count == 0) or count == 1
if not ok:
Expand Down
Loading

0 comments on commit 3e9f8b0

Please sign in to comment.