mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 17:31:36 +00:00
fix storage upgrade tests: "fixture 'func' not found"
This commit is contained in:
parent
0c232905a8
commit
94c4cb44d7
1 changed files with 12 additions and 11 deletions
|
@ -8,21 +8,22 @@ from electrum import constants
|
|||
from .test_wallet import WalletTestCase
|
||||
|
||||
|
||||
def testnet_wallet(func):
|
||||
# note: it's ok to modify global network constants in subclasses of SequentialTestCase
|
||||
def wrapper(self, *args, **kwargs):
|
||||
constants.set_testnet()
|
||||
try:
|
||||
return func(self, *args, **kwargs)
|
||||
finally:
|
||||
constants.set_mainnet()
|
||||
return wrapper
|
||||
|
||||
|
||||
# TODO add other wallet types: 2fa, xpub-only
|
||||
# TODO hw wallet with client version 2.6.x (single-, and multiacc)
|
||||
class TestStorageUpgrade(WalletTestCase):
|
||||
|
||||
def testnet_wallet(func):
|
||||
# note: it's ok to modify global network constants in subclasses of SequentialTestCase
|
||||
def wrapper(self, *args, **kwargs):
|
||||
constants.set_testnet()
|
||||
try:
|
||||
return func(self, *args, **kwargs)
|
||||
finally:
|
||||
constants.set_mainnet()
|
||||
return wrapper
|
||||
|
||||
##########
|
||||
|
||||
def test_upgrade_from_client_1_9_8_seeded(self):
|
||||
wallet_str = "{'addr_history':{'177hEYTccmuYH8u68pYfaLteTxwJrVgvJj':[],'15V7MsQK2vjF5aEXLVG11qi2eZPZsXdnYc':[],'1DgrwN2JCDZ6uPMSvSz8dPeUtaxLxWM2kf':[],'1H3mPXHFzA8UbvhQVabcDjYw3CPb3djvxs':[],'1DjtUCcQwwzA3GSPA7Kd79PMnri7tLDPYC':[],'1PGEgaPG1XJqmuSj68GouotWeYkCtwo4wm':[],'1PAgpPxnL42Hp3cWxmSfdChPqqGiM8g7zj':[],'1HocPduHmQUJerpdaLG8DnmxvnDCVQwWsa':[]},'accounts_expanded':{},'master_public_key':'756d1fe6ded28d43d4fea902a9695feb785447514d6e6c3bdf369f7c3432fdde4409e4efbffbcf10084d57c5a98d1f34d20ac1f133bdb64fa02abf4f7bde1dfb','use_encryption':False,'seed':'2605aafe50a45bdf2eb155302437e678','accounts':{0:{0:['1DjtUCcQwwzA3GSPA7Kd79PMnri7tLDPYC','1PAgpPxnL42Hp3cWxmSfdChPqqGiM8g7zj','177hEYTccmuYH8u68pYfaLteTxwJrVgvJj','1PGEgaPG1XJqmuSj68GouotWeYkCtwo4wm','15V7MsQK2vjF5aEXLVG11qi2eZPZsXdnYc'],1:['1H3mPXHFzA8UbvhQVabcDjYw3CPb3djvxs','1HocPduHmQUJerpdaLG8DnmxvnDCVQwWsa','1DgrwN2JCDZ6uPMSvSz8dPeUtaxLxWM2kf']}},'seed_version':4}"
|
||||
self._upgrade_storage(wallet_str)
|
||||
|
|
Loading…
Add table
Reference in a new issue