unit test fixes
This commit is contained in:
parent
ac2fe3476a
commit
95a22831aa
1 changed files with 11 additions and 5 deletions
|
@ -2,7 +2,7 @@ from binascii import hexlify
|
||||||
from twisted.trial import unittest
|
from twisted.trial import unittest
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
|
||||||
from torba.coin.bitcoinsegwit import MainNetLedger
|
from torba.coin.bitcoinsegwit import MainNetLedger as ledger_class
|
||||||
from torba.baseaccount import HierarchicalDeterministic, SingleKey
|
from torba.baseaccount import HierarchicalDeterministic, SingleKey
|
||||||
from torba.wallet import Wallet
|
from torba.wallet import Wallet
|
||||||
|
|
||||||
|
@ -11,8 +11,11 @@ class TestHierarchicalDeterministicAccount(unittest.TestCase):
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.ledger = MainNetLedger({'db': MainNetLedger.database_class(':memory:')})
|
self.ledger = ledger_class({
|
||||||
yield self.ledger.db.start()
|
'db': ledger_class.database_class(':memory:'),
|
||||||
|
'headers': ledger_class.headers_class(':memory:'),
|
||||||
|
})
|
||||||
|
yield self.ledger.db.open()
|
||||||
self.account = self.ledger.account_class.generate(self.ledger, Wallet(), "torba")
|
self.account = self.ledger.account_class.generate(self.ledger, Wallet(), "torba")
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
@ -171,8 +174,11 @@ class TestSingleKeyAccount(unittest.TestCase):
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.ledger = MainNetLedger({'db': MainNetLedger.database_class(':memory:')})
|
self.ledger = ledger_class({
|
||||||
yield self.ledger.db.start()
|
'db': ledger_class.database_class(':memory:'),
|
||||||
|
'headers': ledger_class.headers_class(':memory:'),
|
||||||
|
})
|
||||||
|
yield self.ledger.db.open()
|
||||||
self.account = self.ledger.account_class.generate(
|
self.account = self.ledger.account_class.generate(
|
||||||
self.ledger, Wallet(), "torba", {'name': 'single-address'})
|
self.ledger, Wallet(), "torba", {'name': 'single-address'})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue