Files

14 lines
399 B
Python
Raw Permalink Normal View History

2026-08-24 08:11:59 -07:00
import unittest
from ledger import Ledger
class HoldoutLedgerTests(unittest.TestCase):
def test_multiple_rejections_do_not_consume_id(self):
ledger = Ledger()
for _ in range(2):
with self.assertRaises(ValueError):
ledger.apply("withdraw", "a", -2)
ledger.apply("fund", "a", 4)
self.assertEqual(ledger.apply("withdraw", "a", -2), 2)