Skip to content

Commit

Permalink
Add test about trying to perform finalize when there isn't an existin…
Browse files Browse the repository at this point in the history
…g active tx.
  • Loading branch information
derekpierre committed Mar 8, 2024
1 parent e1f312e commit 3245c0f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,11 @@ def test_update_failed_retry_attempt(eip1559_transaction, legacy_transaction, mo
@pytest_twisted.inlineCallbacks
def test_finalize_active_tx(eip1559_transaction, mocker, tx_receipt):
tx_tracker = _TxTracker(disk_cache=False)

with pytest.raises(RuntimeError, match="No pending transaction to finalize"):
# there is no active tx
tx_tracker.finalize_active_tx(mocker.Mock())

broadcast_hook = mocker.Mock()
broadcast_failure_hook = mocker.Mock()
fault_hook = mocker.Mock()
Expand Down

0 comments on commit 3245c0f

Please sign in to comment.