forked from LBRYCommunity/lbry-sdk
use absolute imports instead of relative
This commit is contained in:
parent
8aa50aa14f
commit
58da2f16c2
5 changed files with 23 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
|||
from .testcase import CommandTestCase
|
||||
from integration.testcase import CommandTestCase
|
||||
|
||||
|
||||
class AccountManagement(CommandTestCase):
|
||||
|
|
|
@ -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])
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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)
|
||||
|
|
3
tox.ini
3
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
|
||||
|
|
Loading…
Reference in a new issue