added integration test to make sure publishing the same stream re-signs it with the original channel

This commit is contained in:
Lex Berezhny 2019-03-29 20:52:27 -04:00
parent 7b57ba96dd
commit 4230812f82

View file

@ -1,7 +1,6 @@
import hashlib import hashlib
import tempfile import tempfile
from binascii import unhexlify from binascii import unhexlify
from decimal import Decimal
import ecdsa import ecdsa
@ -435,6 +434,15 @@ class StreamCommands(CommandTestCase):
tx3['outputs'][0]['claim_id'] tx3['outputs'][0]['claim_id']
) )
# publishing again re-signs with the same channel
tx4 = await self.publish('foo', languages='uk-UA')
r = await self.resolve('lbry://@abc/foo')
claim = r['lbry://@abc/foo']['claim']
self.assertEqual(claim['txid'], tx4['outputs'][0]['txid'])
self.assertEqual(claim['channel_name'], '@abc')
self.assertEqual(claim['signature_is_valid'], True)
self.assertEqual(claim['value']['stream']['languages'], ['uk-UA'])
async def test_claim_search(self): async def test_claim_search(self):
# search for channel claim # search for channel claim
channel = await self.channel_create('@abc', '1.0') channel = await self.channel_create('@abc', '1.0')