forked from LBRYCommunity/lbry-sdk
lint on tests
This commit is contained in:
parent
4c6dedfa4f
commit
0301768b79
1 changed files with 5 additions and 6 deletions
|
@ -77,8 +77,7 @@ class PurchaseCommandTests(CommandTestCase):
|
||||||
claim_id = stream.outputs[0].claim_id
|
claim_id = stream.outputs[0].claim_id
|
||||||
|
|
||||||
# explicit purchase of claim
|
# explicit purchase of claim
|
||||||
tx = lambda: self.daemon.jsonrpc_purchase_create(claim_id)
|
await self.assertStreamPurchased(stream, lambda: self.daemon.jsonrpc_purchase_create(claim_id))
|
||||||
await self.assertStreamPurchased(stream, tx)
|
|
||||||
|
|
||||||
# check that `get` doesn't purchase it again
|
# check that `get` doesn't purchase it again
|
||||||
balance = await self.account.get_balance()
|
balance = await self.account.get_balance()
|
||||||
|
@ -110,13 +109,13 @@ class PurchaseCommandTests(CommandTestCase):
|
||||||
await self.daemon.jsonrpc_purchase_create(claim_id)
|
await self.daemon.jsonrpc_purchase_create(claim_id)
|
||||||
|
|
||||||
# force purchasing claim you already own
|
# force purchasing claim you already own
|
||||||
tx = lambda: self.daemon.jsonrpc_purchase_create(claim_id, allow_duplicate_purchase=True)
|
await self.assertStreamPurchased(
|
||||||
await self.assertStreamPurchased(stream, tx)
|
stream, lambda: self.daemon.jsonrpc_purchase_create(claim_id, allow_duplicate_purchase=True)
|
||||||
|
)
|
||||||
|
|
||||||
# purchase by uri
|
# purchase by uri
|
||||||
abc_stream = await self.priced_stream('abc')
|
abc_stream = await self.priced_stream('abc')
|
||||||
tx = lambda: self.daemon.jsonrpc_purchase_create(url='lbry://abc')
|
await self.assertStreamPurchased(abc_stream, lambda: self.daemon.jsonrpc_purchase_create(url='lbry://abc'))
|
||||||
await self.assertStreamPurchased(abc_stream, tx)
|
|
||||||
|
|
||||||
async def test_purchase_and_transaction_list(self):
|
async def test_purchase_and_transaction_list(self):
|
||||||
self.assertItemCount(await self.daemon.jsonrpc_purchase_list(), 0)
|
self.assertItemCount(await self.daemon.jsonrpc_purchase_list(), 0)
|
||||||
|
|
Loading…
Reference in a new issue