improving code coverage

This commit is contained in:
Lex Berezhny 2018-07-04 21:17:45 -04:00
parent dd40d2e6ce
commit e2296d4491
2 changed files with 2 additions and 9 deletions

View file

@ -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()

View file

@ -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