From 0301768b79fba039eac266eab3dbeb94a56a56b9 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Thu, 19 Dec 2019 22:58:36 -0300 Subject: [PATCH] lint on tests --- lbry/tests/integration/test_purchase_command.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lbry/tests/integration/test_purchase_command.py b/lbry/tests/integration/test_purchase_command.py index 8e9cd6ade..aac4bbcac 100644 --- a/lbry/tests/integration/test_purchase_command.py +++ b/lbry/tests/integration/test_purchase_command.py @@ -77,8 +77,7 @@ class PurchaseCommandTests(CommandTestCase): claim_id = stream.outputs[0].claim_id # explicit purchase of claim - tx = lambda: self.daemon.jsonrpc_purchase_create(claim_id) - await self.assertStreamPurchased(stream, tx) + await self.assertStreamPurchased(stream, lambda: self.daemon.jsonrpc_purchase_create(claim_id)) # check that `get` doesn't purchase it again balance = await self.account.get_balance() @@ -110,13 +109,13 @@ class PurchaseCommandTests(CommandTestCase): await self.daemon.jsonrpc_purchase_create(claim_id) # force purchasing claim you already own - tx = lambda: self.daemon.jsonrpc_purchase_create(claim_id, allow_duplicate_purchase=True) - await self.assertStreamPurchased(stream, tx) + await self.assertStreamPurchased( + stream, lambda: self.daemon.jsonrpc_purchase_create(claim_id, allow_duplicate_purchase=True) + ) # purchase by uri abc_stream = await self.priced_stream('abc') - tx = lambda: self.daemon.jsonrpc_purchase_create(url='lbry://abc') - await self.assertStreamPurchased(abc_stream, tx) + await self.assertStreamPurchased(abc_stream, lambda: self.daemon.jsonrpc_purchase_create(url='lbry://abc')) async def test_purchase_and_transaction_list(self): self.assertItemCount(await self.daemon.jsonrpc_purchase_list(), 0)