• Stefy Lanza (nextime / spora )'s avatar
    test_topup: use real migrated DB and current handler API · b8a1d9a6
    Stefy Lanza (nextime / spora ) authored
    PaymentService construction now initializes crypto master keys, so the tests
    need a real migrated SQLite DB rather than a Mock. Also align with the current
    code: initiate_topup delegates to create_topup_intent/create_topup_order; the
    Stripe webhook path requires amount in metadata, passes a metadata dict, and is
    exercised by patching stripe.Webhook.construct_event; crypto deposits credit the
    fiat wallet directly via SQL (assert the resulting balance) using the monitor's
    own price service (returning a float for SQLite binding).
    Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
    b8a1d9a6
test_topup.py 6.84 KB