follow-up of prev commit: fix travis build
This commit is contained in:
parent
7ba233f2ab
commit
3fe2af242e
|
@ -1,3 +1,6 @@
|
||||||
|
import shutil
|
||||||
|
import tempfile
|
||||||
|
|
||||||
from lib.storage import WalletStorage
|
from lib.storage import WalletStorage
|
||||||
from lib.wallet import Wallet
|
from lib.wallet import Wallet
|
||||||
|
|
||||||
|
@ -241,13 +244,22 @@ class TestStorageUpgrade(WalletTestCase):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
|
super().setUpClass()
|
||||||
from lib.plugins import Plugins
|
from lib.plugins import Plugins
|
||||||
from lib.simple_config import SimpleConfig
|
from lib.simple_config import SimpleConfig
|
||||||
config = SimpleConfig()
|
|
||||||
|
cls.electrum_path = tempfile.mkdtemp()
|
||||||
|
config = SimpleConfig({'electrum_path': cls.electrum_path})
|
||||||
|
|
||||||
gui_name = 'qt'
|
gui_name = 'qt'
|
||||||
# TODO it's probably wasteful to load all plugins... only need Trezor
|
# TODO it's probably wasteful to load all plugins... only need Trezor
|
||||||
Plugins(config, True, gui_name)
|
Plugins(config, True, gui_name)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def tearDownClass(cls):
|
||||||
|
super().tearDownClass()
|
||||||
|
shutil.rmtree(cls.electrum_path)
|
||||||
|
|
||||||
def _upgrade_storage(self, wallet_json, accounts=1):
|
def _upgrade_storage(self, wallet_json, accounts=1):
|
||||||
storage = self._load_storage_from_json_string(wallet_json, manual_upgrades=True)
|
storage = self._load_storage_from_json_string(wallet_json, manual_upgrades=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue