mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-08-23 17:27:25 +00:00
tests
This commit is contained in:
parent
a1abb7c8fb
commit
a14b0aa573
1 changed files with 7 additions and 0 deletions
|
@ -518,8 +518,12 @@ class StreamCommands(CommandTestCase):
|
||||||
file.flush()
|
file.flush()
|
||||||
tx1 = await self.publish('foo', bid='1.0', file_path=file.name)
|
tx1 = await self.publish('foo', bid='1.0', file_path=file.name)
|
||||||
|
|
||||||
|
self.assertEqual(1, len(self.daemon.jsonrpc_file_list()))
|
||||||
|
|
||||||
# doesn't error on missing arguments when doing an update stream
|
# doesn't error on missing arguments when doing an update stream
|
||||||
tx2 = await self.publish('foo', tags='updated')
|
tx2 = await self.publish('foo', tags='updated')
|
||||||
|
|
||||||
|
self.assertEqual(1, len(self.daemon.jsonrpc_file_list()))
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
tx1['outputs'][0]['claim_id'],
|
tx1['outputs'][0]['claim_id'],
|
||||||
tx2['outputs'][0]['claim_id']
|
tx2['outputs'][0]['claim_id']
|
||||||
|
@ -530,12 +534,14 @@ class StreamCommands(CommandTestCase):
|
||||||
with self.assertRaisesRegex(Exception, "There are 2 claims for 'foo'"):
|
with self.assertRaisesRegex(Exception, "There are 2 claims for 'foo'"):
|
||||||
await self.daemon.jsonrpc_publish('foo')
|
await self.daemon.jsonrpc_publish('foo')
|
||||||
|
|
||||||
|
self.assertEqual(2, len(self.daemon.jsonrpc_file_list()))
|
||||||
# abandon duplicate stream
|
# abandon duplicate stream
|
||||||
await self.stream_abandon(tx3['outputs'][0]['claim_id'])
|
await self.stream_abandon(tx3['outputs'][0]['claim_id'])
|
||||||
|
|
||||||
# publish to a channel
|
# publish to a channel
|
||||||
await self.channel_create('@abc')
|
await self.channel_create('@abc')
|
||||||
tx3 = await self.publish('foo', channel_name='@abc')
|
tx3 = await self.publish('foo', channel_name='@abc')
|
||||||
|
self.assertEqual(2, len(self.daemon.jsonrpc_file_list()))
|
||||||
r = await self.resolve('lbry://@abc/foo')
|
r = await self.resolve('lbry://@abc/foo')
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
r['lbry://@abc/foo']['claim']['claim_id'],
|
r['lbry://@abc/foo']['claim']['claim_id'],
|
||||||
|
@ -544,6 +550,7 @@ class StreamCommands(CommandTestCase):
|
||||||
|
|
||||||
# publishing again re-signs with the same channel
|
# publishing again re-signs with the same channel
|
||||||
tx4 = await self.publish('foo', languages='uk-UA')
|
tx4 = await self.publish('foo', languages='uk-UA')
|
||||||
|
self.assertEqual(2, len(self.daemon.jsonrpc_file_list()))
|
||||||
r = await self.resolve('lbry://@abc/foo')
|
r = await self.resolve('lbry://@abc/foo')
|
||||||
claim = r['lbry://@abc/foo']['claim']
|
claim = r['lbry://@abc/foo']['claim']
|
||||||
self.assertEqual(claim['txid'], tx4['outputs'][0]['txid'])
|
self.assertEqual(claim['txid'], tx4['outputs'][0]['txid'])
|
||||||
|
|
Loading…
Add table
Reference in a new issue