commit 94c4cb44d723133bb18dfea578d266f2e36c9cb6
parent 0c232905a81863ac5732b9e51b351fff7305221e
Author: SomberNight <somber.night@protonmail.com>
Date: Fri, 1 Mar 2019 21:02:10 +0100
fix storage upgrade tests: "fixture 'func' not found"
Diffstat:
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/electrum/tests/test_storage_upgrade.py b/electrum/tests/test_storage_upgrade.py
@@ -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)