From 07e8ab37e9fcc4bedc216d2313811596ef55f4a2 Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Tue, 7 Jun 2022 11:49:09 -0400 Subject: [PATCH] Simplify InsufficientFundsError testcase. --- tests/unit/wallet/test_transaction.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/unit/wallet/test_transaction.py b/tests/unit/wallet/test_transaction.py index 6580d5aaa..e12b0e756 100644 --- a/tests/unit/wallet/test_transaction.py +++ b/tests/unit/wallet/test_transaction.py @@ -617,16 +617,12 @@ class TransactionIOBalancing(AsyncioTestCase): await self.ledger.release_outputs(utxos) # everything: insufficient funds - try: + with self.assertRaises(lbry.error.InsufficientFundsError): tx = await self.tx( [], # inputs [self.txo(19.93)], # outputs everything=True ) - except lbry.error.InsufficientFundsError: - pass - else: - self.fail("expected InsufficientFunds exception") await self.ledger.release_outputs(utxos)