Update tests for COIN changes
This commit is contained in:
parent
c1c4906fba
commit
8f004785af
@ -26,13 +26,13 @@
|
||||
|
||||
import pytest
|
||||
|
||||
from lib.coins import Litecoin, Bitcoin, Zcash
|
||||
from lib.coins import Litecoin, BitcoinCash, Zcash
|
||||
from lib.hash import Base58
|
||||
|
||||
addresses = [
|
||||
(Bitcoin, "13xDKJbjh4acmLpNVr6Lc9hFcXRr9fyt4x",
|
||||
(BitcoinCash, "13xDKJbjh4acmLpNVr6Lc9hFcXRr9fyt4x",
|
||||
"206168f5322583ff37f8e55665a4789ae8963532", "b8cb80b26e8932f5b12a7e"),
|
||||
(Bitcoin, "3GxRZWkJufR5XA8hnNJgQ2gkASSheoBcmW",
|
||||
(BitcoinCash, "3GxRZWkJufR5XA8hnNJgQ2gkASSheoBcmW",
|
||||
"a773db925b09add367dcc253c1f9bbc1d11ec6fd", "062d8515e50cb92b8a3a73"),
|
||||
(Litecoin, "LNBAaWuZmipg29WXfz5dtAm1pjo8FEH8yg",
|
||||
"206168f5322583ff37f8e55665a4789ae8963532", "b8cb80b26e8932f5b12a7e"),
|
||||
|
||||
@ -115,6 +115,7 @@ def run_test(db_dir):
|
||||
environ.clear()
|
||||
environ['DB_DIRECTORY'] = db_dir
|
||||
environ['DAEMON_URL'] = ''
|
||||
environ['COIN'] = 'BitcoinCash'
|
||||
env = Env()
|
||||
db = DB(env)
|
||||
# Test abstract compaction
|
||||
|
||||
@ -15,6 +15,7 @@ BASE_DB_DIR = '/some/dir'
|
||||
base_environ = {
|
||||
'DB_DIRECTORY': BASE_DB_DIR,
|
||||
'DAEMON_URL': BASE_DAEMON_URL,
|
||||
'COIN': 'BitcoinCash',
|
||||
}
|
||||
|
||||
def setup_base_env():
|
||||
@ -77,10 +78,10 @@ def test_COIN_NET():
|
||||
'''Test COIN and NET defaults and redirection.'''
|
||||
setup_base_env()
|
||||
e = Env()
|
||||
assert e.coin == lib_coins.Bitcoin
|
||||
assert e.coin == lib_coins.BitcoinCash
|
||||
os.environ['NET'] = 'testnet'
|
||||
e = Env()
|
||||
assert e.coin == lib_coins.BitcoinTestnet
|
||||
assert e.coin == lib_coins.BitcoinCashTestnet
|
||||
os.environ.pop('NET')
|
||||
os.environ['COIN'] = 'Litecoin'
|
||||
e = Env()
|
||||
@ -102,7 +103,8 @@ def test_HOST():
|
||||
assert e.cs_host() == ['192.168.0.1', '23.45.67.89']
|
||||
|
||||
def test_REORG_LIMIT():
|
||||
assert_integer('REORG_LIMIT', 'reorg_limit', lib_coins.Bitcoin.REORG_LIMIT)
|
||||
assert_integer('REORG_LIMIT', 'reorg_limit',
|
||||
lib_coins.BitcoinCash.REORG_LIMIT)
|
||||
|
||||
def test_TCP_PORT():
|
||||
assert_integer('TCP_PORT', 'tcp_port', None)
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
import pytest
|
||||
|
||||
import wallet.bip32 as bip32
|
||||
from lib.coins import Bitcoin, CoinError
|
||||
from lib.coins import BitcoinCash as Bitcoin, CoinError
|
||||
from lib.hash import Base58
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user