diff --git a/tests/integration/test_account_commands.py b/tests/integration/test_account_commands.py index 15e2c4e53..139a481a1 100644 --- a/tests/integration/test_account_commands.py +++ b/tests/integration/test_account_commands.py @@ -1,4 +1,4 @@ -from .testcase import CommandTestCase +from integration.testcase import CommandTestCase class AccountManagement(CommandTestCase): diff --git a/tests/integration/test_chris45.py b/tests/integration/test_chris45.py index 29ea1ebf5..0a71c391f 100644 --- a/tests/integration/test_chris45.py +++ b/tests/integration/test_chris45.py @@ -1,5 +1,5 @@ import tempfile -from .testcase import CommandTestCase +from integration.testcase import CommandTestCase class EpicAdventuresOfChris45(CommandTestCase): @@ -41,7 +41,7 @@ class EpicAdventuresOfChris45(CommandTestCase): self.assertEqual(result, '8.989893') # And is the channel resolvable and empty? - response = await self.out(self.daemon.jsonrpc_resolve(uri='lbry://@spam')) + response = await self.out(self.daemon.jsonrpc_resolve('lbry://@spam')) self.assertIn('lbry://@spam', response) self.assertIn('certificate', response['lbry://@spam']) @@ -71,7 +71,7 @@ class EpicAdventuresOfChris45(CommandTestCase): # Also checks that his new story can be found on the blockchain before # giving the link to all his friends. - response = await self.out(self.daemon.jsonrpc_resolve(uri='lbry://@spam/hovercraft')) + response = await self.out(self.daemon.jsonrpc_resolve('lbry://@spam/hovercraft')) self.assertIn('lbry://@spam/hovercraft', response) self.assertIn('claim', response['lbry://@spam/hovercraft']) @@ -103,7 +103,7 @@ class EpicAdventuresOfChris45(CommandTestCase): await self.confirm_tx(abandon['tx']['txid']) # And now checks that the claim doesn't resolve anymore. - response = await self.out(self.daemon.jsonrpc_resolve(uri='lbry://@spam/hovercraft')) + response = await self.out(self.daemon.jsonrpc_resolve('lbry://@spam/hovercraft')) self.assertNotIn('claim', response['lbry://@spam/hovercraft']) # After abandoning he just waits for his LBCs to be returned to his account @@ -159,7 +159,7 @@ class EpicAdventuresOfChris45(CommandTestCase): await self.confirm_tx(tx['txid']) # And check if his support showed up - resolve_result = await self.out(self.daemon.jsonrpc_resolve(uri=uri)) + resolve_result = await self.out(self.daemon.jsonrpc_resolve(uri)) # It obviously did! Because, blockchain baby \O/ self.assertEqual(resolve_result[uri]['claim']['amount'], '1.0') self.assertEqual(resolve_result[uri]['claim']['effective_amount'], '1.2') @@ -174,7 +174,7 @@ class EpicAdventuresOfChris45(CommandTestCase): await self.confirm_tx(tx['txid']) # And again checks if it went to the just right place - resolve_result = await self.out(self.daemon.jsonrpc_resolve(uri=uri)) + resolve_result = await self.out(self.daemon.jsonrpc_resolve(uri)) # Which it obviously did. Because....????? self.assertEqual(resolve_result[uri]['claim']['supports'][1]['amount'], '0.3') self.assertEqual(resolve_result[uri]['claim']['supports'][1]['txid'], tx['txid']) @@ -185,7 +185,7 @@ class EpicAdventuresOfChris45(CommandTestCase): await self.confirm_tx(tx['txid']) # And check if his support showed up - resolve_result = await self.out(self.daemon.jsonrpc_resolve(uri=uri)) + resolve_result = await self.out(self.daemon.jsonrpc_resolve(uri)) # It did! self.assertEqual(resolve_result[uri]['claim']['supports'][2]['amount'], '0.4') self.assertEqual(resolve_result[uri]['claim']['supports'][2]['txid'], tx['txid']) @@ -220,5 +220,5 @@ class EpicAdventuresOfChris45(CommandTestCase): await self.confirm_tx(abandon['tx']['txid']) # He them checks that the claim doesn't resolve anymore. - response = await self.out(self.daemon.jsonrpc_resolve(uri=uri)) + response = await self.out(self.daemon.jsonrpc_resolve(uri)) self.assertNotIn('claim', response[uri]) diff --git a/tests/integration/test_claim_commands.py b/tests/integration/test_claim_commands.py index 1c474e80f..2880562ee 100644 --- a/tests/integration/test_claim_commands.py +++ b/tests/integration/test_claim_commands.py @@ -4,7 +4,7 @@ from lbrynet.extras.wallet.transaction import Transaction from lbrynet.error import InsufficientFundsError from lbrynet.schema.claim import ClaimDict -from .testcase import CommandTestCase +from integration.testcase import CommandTestCase class ClaimCommands(CommandTestCase): diff --git a/tests/integration/test_resolve_command.py b/tests/integration/test_resolve_command.py index 1bef56f04..9f2ce1730 100644 --- a/tests/integration/test_resolve_command.py +++ b/tests/integration/test_resolve_command.py @@ -1,4 +1,4 @@ -from .testcase import CommandTestCase +from integration.testcase import CommandTestCase class ResolveCommand(CommandTestCase): @@ -46,3 +46,14 @@ class ResolveCommand(CommandTestCase): self.assertEqual(claim['claim']['channel_name'], '@abc') self.assertEqual(claim['certificate']['name'], '@abc') self.assertEqual(claim['claims_in_channel'], 0) + + # resolving multiple at once + response = await self.resolve(['lbry://foo', 'lbry://foo2']) + self.assertSetEqual({'lbry://foo', 'lbry://foo2'}, set(response)) + claim = response['lbry://foo2'] + self.assertIn('certificate', claim) + self.assertIn('claim', claim) + self.assertEqual(claim['claim']['name'], 'foo2') + self.assertEqual(claim['claim']['channel_name'], '@abc') + self.assertEqual(claim['certificate']['name'], '@abc') + self.assertEqual(claim['claims_in_channel'], 0) diff --git a/tox.ini b/tox.ini index 0121627c6..e3b237816 100644 --- a/tox.ini +++ b/tox.ini @@ -12,5 +12,4 @@ setenv = TORBA_LEDGER=lbrynet.extras.wallet commands = orchstr8 download - coverage run -p --source={envsitepackagesdir}/lbrynet -m unittest discover -vv integration.wallet - coverage run -p --source={envsitepackagesdir}/lbrynet -m unittest discover -vv integration.cli + coverage run -p --source={envsitepackagesdir}/lbrynet -m unittest discover -vv integration