diff --git a/lbry/wallet/ledger.py b/lbry/wallet/ledger.py index 18c0c44dd..2ec260d88 100644 --- a/lbry/wallet/ledger.py +++ b/lbry/wallet/ledger.py @@ -786,7 +786,7 @@ class Ledger(metaclass=LedgerRegistry): if hub_server: outputs = Outputs.from_grpc(encoded_outputs) else: - outputs = Outputs.from_base64(encoded_outputs or b'') # TODO: why is the server returning None? + outputs = Outputs.from_base64(encoded_outputs or '') # TODO: why is the server returning None? txs: List[Transaction] = [] if len(outputs.txs) > 0: async for tx in self.request_transactions(tuple(outputs.txs), cached=True): diff --git a/tests/integration/blockchain/test_purchase_command.py b/tests/integration/blockchain/test_purchase_command.py index a83c9809a..3b66be936 100644 --- a/tests/integration/blockchain/test_purchase_command.py +++ b/tests/integration/blockchain/test_purchase_command.py @@ -103,7 +103,7 @@ class PurchaseCommandTests(CommandTestCase): # purchase non-existent claim fails with self.assertRaisesRegex(Exception, "Could not find claim with claim_id"): - await self.daemon.jsonrpc_purchase_create('abc123') + await self.daemon.jsonrpc_purchase_create('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') # purchase stream with no price fails no_price_stream = await self.priced_stream('no_price_stream', price=None) diff --git a/tests/integration/blockchain/test_wallet_server_sessions.py b/tests/integration/blockchain/test_wallet_server_sessions.py index d56a8ccb3..70e2535d9 100644 --- a/tests/integration/blockchain/test_wallet_server_sessions.py +++ b/tests/integration/blockchain/test_wallet_server_sessions.py @@ -103,19 +103,20 @@ class TestESSync(CommandTestCase): self.assertEqual(0, len(await self.claim_search(order_by=['height']))) # reindex, 10 claims should be returned - await es_writer.reindex() + await es_writer.reindex(force=True) self.assertEqual(10, len(await self.claim_search(order_by=['height']))) server_search_client.clear_caches() self.assertEqual(10, len(await self.claim_search(order_by=['height']))) # reindex again, this should not appear to do anything but will delete and reinsert the same 10 claims - await es_writer.reindex() + await es_writer.reindex(force=True) self.assertEqual(10, len(await self.claim_search(order_by=['height']))) server_search_client.clear_caches() self.assertEqual(10, len(await self.claim_search(order_by=['height']))) # delete the index again and stop the writer, upon starting it the writer should reindex automatically - await es_writer.stop(delete_index=True) + await es_writer.delete_index() + await es_writer.stop() server_search_client.clear_caches() self.assertEqual(0, len(await self.claim_search(order_by=['height']))) diff --git a/tests/integration/claims/test_claim_commands.py b/tests/integration/claims/test_claim_commands.py index 58015d2d7..3d8ea5f85 100644 --- a/tests/integration/claims/test_claim_commands.py +++ b/tests/integration/claims/test_claim_commands.py @@ -1516,6 +1516,7 @@ class StreamCommands(ClaimTestCase): await self.stream_repost(bad_content_id, 'filter1', '0.1', channel_name='@filtering') self.assertEqual(1, len(self.conductor.spv_node.es_writer.db.filtered_streams)) + self.assertEqual('0.1', (await self.out(self.daemon.jsonrpc_resolve('bad_content')))['bad_content']['amount']) # search for filtered content directly result = await self.out(self.daemon.jsonrpc_claim_search(name='bad_content')) blocked = result['blocked'] @@ -1568,7 +1569,6 @@ class StreamCommands(ClaimTestCase): self.assertEqual(1, len(self.conductor.spv_node.es_writer.db.blocked_streams)) # blocked content is not resolveable - print((await self.resolve('lbry://@some_channel/bad_content'))) 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")) @@ -1625,6 +1625,11 @@ class StreamCommands(ClaimTestCase): self.assertEqual((await self.resolve('lbry://worse_content'))['error']['name'], 'BLOCKED') self.assertEqual((await self.resolve('lbry://@bad_channel/worse_content'))['error']['name'], 'BLOCKED') + await self.stream_update(worse_content_id, channel_name='@bad_channel', tags=['bad-stuff']) + self.assertEqual((await self.resolve('lbry://@bad_channel'))['error']['name'], 'BLOCKED') + self.assertEqual((await self.resolve('lbry://worse_content'))['error']['name'], 'BLOCKED') + self.assertEqual((await self.resolve('lbry://@bad_channel/worse_content'))['error']['name'], 'BLOCKED') + async def test_publish_updates_file_list(self): tx = await self.stream_create(title='created') txo = tx['outputs'][0]