forked from LBRYCommunity/lbry-sdk
improving code coverage
This commit is contained in:
parent
dd40d2e6ce
commit
e2296d4491
2 changed files with 2 additions and 9 deletions
|
@ -70,8 +70,7 @@ class TestWalletCreation(unittest.TestCase):
|
|||
wallet_file.seek(0)
|
||||
|
||||
# create and write wallet to a file
|
||||
wallet_storage = WalletStorage(wallet_file.name)
|
||||
wallet = Wallet.from_storage(wallet_storage, manager)
|
||||
wallet = manager.import_wallet(wallet_file.name)
|
||||
account = wallet.generate_account(ledger)
|
||||
wallet.save()
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class WalletManager(object):
|
|||
self.ledgers[ledger_class] = ledger
|
||||
return ledger
|
||||
|
||||
def create_wallet(self, path):
|
||||
def import_wallet(self, path):
|
||||
storage = WalletStorage(path)
|
||||
wallet = Wallet.from_storage(storage, self)
|
||||
self.wallets.append(wallet)
|
||||
|
@ -57,12 +57,6 @@ class WalletManager(object):
|
|||
for wallet in self.wallets:
|
||||
return wallet.default_account
|
||||
|
||||
def get_accounts(self, coin_class):
|
||||
for wallet in self.wallets:
|
||||
for account in wallet.accounts:
|
||||
if account.coin.__class__ is coin_class:
|
||||
yield account
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def start(self):
|
||||
self.running = True
|
||||
|
|
Loading…
Reference in a new issue