From dd5507036fff4e48be61be57c2639addf1b667c8 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Wed, 23 Oct 2019 13:56:14 -0400 Subject: [PATCH] fix broken tests --- lbry/tests/unit/wallet/server/test_sqldb.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lbry/tests/unit/wallet/server/test_sqldb.py b/lbry/tests/unit/wallet/server/test_sqldb.py index 8705f3761..8393fb350 100644 --- a/lbry/tests/unit/wallet/server/test_sqldb.py +++ b/lbry/tests/unit/wallet/server/test_sqldb.py @@ -91,7 +91,8 @@ class TestSQLDB(unittest.TestCase): result[0].tx._reset() return result - def get_stream_update(self, stream, amount, channel=None): + def get_stream_update(self, tx, amount, channel=None): + stream = Transaction(tx[0].serialize()).outputs[0] result = self._make_tx( Output.pay_update_claim_pubkey_hash( amount, stream.claim_name, stream.claim_id, stream.claim, b'abc' @@ -405,7 +406,7 @@ class TestClaimtrie(TestSQLDB): # change channel of stream self.assertEqual("@foo#a/foo#ab", reader._search(claim_id=ab2_claim.claim_id, limit=1)[0]['canonical_url']) - tx_ab2 = self.get_stream_update(ab2_claim, COIN, txo_chan_ab) + tx_ab2 = self.get_stream_update(tx_ab2, COIN, txo_chan_ab) advance(10, [tx_ab2]) self.assertEqual("@foo#ab/foo#a", reader._search(claim_id=ab2_claim.claim_id, limit=1)[0]['canonical_url']) # TODO: currently there is a bug where stream leaving a channel does not update that channels claims count