forked from LBRYCommunity/lbry-sdk
unit test fixes
This commit is contained in:
parent
32ba594e55
commit
0ffec82e35
3 changed files with 6 additions and 6 deletions
|
@ -8,7 +8,7 @@ from torba.coin.bitcoinsegwit import MainNetLedger
|
||||||
class TestKeyChain(unittest.TestCase):
|
class TestKeyChain(unittest.TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.ledger = MainNetLedger(db=MainNetLedger.database_class(':memory:'))
|
self.ledger = MainNetLedger({'db': MainNetLedger.database_class(':memory:')})
|
||||||
return self.ledger.db.start()
|
return self.ledger.db.start()
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
@ -68,7 +68,7 @@ class TestKeyChain(unittest.TestCase):
|
||||||
class TestAccount(unittest.TestCase):
|
class TestAccount(unittest.TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.ledger = MainNetLedger(db=MainNetLedger.database_class(':memory:'))
|
self.ledger = MainNetLedger({'db': MainNetLedger.database_class(':memory:')})
|
||||||
return self.ledger.db.start()
|
return self.ledger.db.start()
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
|
|
@ -40,7 +40,7 @@ class BIP32Tests(unittest.TestCase):
|
||||||
with self.assertRaisesRegex(ValueError, 'private key must be 32 bytes'):
|
with self.assertRaisesRegex(ValueError, 'private key must be 32 bytes'):
|
||||||
PrivateKey(None, b'abcd', b'abcd'*8, 0, 255)
|
PrivateKey(None, b'abcd', b'abcd'*8, 0, 255)
|
||||||
private_key = PrivateKey(
|
private_key = PrivateKey(
|
||||||
MainNetLedger(db=True),
|
MainNetLedger({'db': True}),
|
||||||
unhexlify('2423f3dc6087d9683f73a684935abc0ccd8bc26370588f56653128c6a6f0bf7c'),
|
unhexlify('2423f3dc6087d9683f73a684935abc0ccd8bc26370588f56653128c6a6f0bf7c'),
|
||||||
b'abcd'*8, 0, 1
|
b'abcd'*8, 0, 1
|
||||||
)
|
)
|
||||||
|
@ -57,7 +57,7 @@ class BIP32Tests(unittest.TestCase):
|
||||||
self.assertIsInstance(private_key.child(PrivateKey.HARDENED), PrivateKey)
|
self.assertIsInstance(private_key.child(PrivateKey.HARDENED), PrivateKey)
|
||||||
|
|
||||||
def test_from_extended_keys(self):
|
def test_from_extended_keys(self):
|
||||||
ledger = MainNetLedger(db=True)
|
ledger = MainNetLedger({'db': True})
|
||||||
self.assertIsInstance(
|
self.assertIsInstance(
|
||||||
from_extended_key_string(
|
from_extended_key_string(
|
||||||
ledger,
|
ledger,
|
||||||
|
|
|
@ -30,7 +30,7 @@ def get_transaction(txo=None):
|
||||||
class TestSizeAndFeeEstimation(unittest.TestCase):
|
class TestSizeAndFeeEstimation(unittest.TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.ledger = ledger_class(db=ledger_class.database_class(':memory:'))
|
self.ledger = ledger_class({'db': ledger_class.database_class(':memory:')})
|
||||||
return self.ledger.db.start()
|
return self.ledger.db.start()
|
||||||
|
|
||||||
def io_fee(self, io):
|
def io_fee(self, io):
|
||||||
|
@ -143,7 +143,7 @@ class TestTransactionSerialization(unittest.TestCase):
|
||||||
class TestTransactionSigning(unittest.TestCase):
|
class TestTransactionSigning(unittest.TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.ledger = ledger_class(db=ledger_class.database_class(':memory:'))
|
self.ledger = ledger_class({'db': ledger_class.database_class(':memory:')})
|
||||||
return self.ledger.db.start()
|
return self.ledger.db.start()
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
|
Loading…
Add table
Reference in a new issue