StreamCommands

This commit is contained in:
Lex Berezhny 2021-04-21 11:32:00 -04:00
parent 8f04a50ce1
commit 2a8ccb065b

View file

@ -1430,7 +1430,7 @@ class StreamCommands(ClaimTestCase):
self.assertEqual(1, blocked['total'])
self.assertEqual(1, len(blocked['channels']))
self.assertEqual(1, blocked['channels'][0]['blocked'])
self.assertTrue(blocked['channels'][0]['channel']['short_url'].startswith('lbry://@filtering#'))
self.assertTrue(blocked['channels'][0]['channel']['short_url'].startswith('lbry://@filtering:'))
# same search, but details omitted by 'no_totals'
last_result = result
@ -1444,7 +1444,7 @@ class StreamCommands(ClaimTestCase):
self.assertEqual(1, filtered['total'])
self.assertEqual(1, len(filtered['channels']))
self.assertEqual(1, filtered['channels'][0]['blocked'])
self.assertTrue(filtered['channels'][0]['channel']['short_url'].startswith('lbry://@filtering#'))
self.assertTrue(filtered['channels'][0]['channel']['short_url'].startswith('lbry://@filtering:'))
# same search, but details omitted by 'no_totals'
last_result = result
@ -1474,7 +1474,7 @@ class StreamCommands(ClaimTestCase):
error = (await self.resolve('lbry://@some_channel/bad_content'))['error']
self.assertEqual(error['name'], 'BLOCKED')
self.assertTrue(error['text'].startswith("Resolve of 'lbry://@some_channel/bad_content' was censored"))
self.assertTrue(error['censor']['short_url'].startswith('lbry://@blocking#'))
self.assertTrue(error['censor']['short_url'].startswith('lbry://@blocking:'))
# a filtered/blocked channel impacts all content inside it
bad_channel_id = self.get_claim_id(
@ -1502,7 +1502,7 @@ class StreamCommands(ClaimTestCase):
self.assertEqual(3, filtered['total'])
self.assertEqual(1, len(filtered['channels']))
self.assertEqual(3, filtered['channels'][0]['blocked'])
self.assertTrue(filtered['channels'][0]['channel']['short_url'].startswith('lbry://@filtering#'))
self.assertTrue(filtered['channels'][0]['channel']['short_url'].startswith('lbry://@filtering:'))
# same search, but details omitted by 'no_totals'
last_result = result