From c9c3585e1eef954bc91f260ce7fc8113b8bdb83a Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Mon, 9 Jul 2018 22:02:18 -0400 Subject: [PATCH] test for Transaction.liquidate --- tests/integration/test_transactions.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/integration/test_transactions.py b/tests/integration/test_transactions.py index 8220de3ac..0f62e12b2 100644 --- a/tests/integration/test_transactions.py +++ b/tests/integration/test_transactions.py @@ -44,3 +44,12 @@ class BasicTransactionTests(IntegrationTestCase): all_balances = await d2f(self.manager.get_balance()) self.assertIn(self.ledger.get_id(), all_balances) self.assertEqual(round(all_balances[self.ledger.get_id()]/COIN, 1), 9.9) + + utxos = await d2f(self.account.get_unspent_outputs()) + tx = await d2f(self.ledger.transaction_class.liquidate( + [utxos[0]], [account1], account1 + )) + await self.broadcast(tx) + await self.on_transaction(tx) # mempool + await self.blockchain.generate(1) + await self.on_transaction(tx) # confirmed