mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 14:14:22 +01:00
Refactors the tests to match the new class definitions and config formats
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
from teos.tools import can_connect_to_bitcoind, in_correct_network, bitcoin_cli
|
||||
|
||||
from common.tools import check_sha256_hex_format
|
||||
from test.teos.unit.conftest import bitcoind_connect_params
|
||||
|
||||
|
||||
def test_in_correct_network(run_bitcoind):
|
||||
# The simulator runs as if it was regtest, so every other network should fail
|
||||
assert in_correct_network("mainnet") is False
|
||||
assert in_correct_network("testnet") is False
|
||||
assert in_correct_network("regtest") is True
|
||||
assert in_correct_network(bitcoind_connect_params, "mainnet") is False
|
||||
assert in_correct_network(bitcoind_connect_params, "testnet") is False
|
||||
assert in_correct_network(bitcoind_connect_params, "regtest") is True
|
||||
|
||||
|
||||
def test_can_connect_to_bitcoind():
|
||||
assert can_connect_to_bitcoind() is True
|
||||
assert can_connect_to_bitcoind(bitcoind_connect_params) is True
|
||||
|
||||
|
||||
# def test_can_connect_to_bitcoind_bitcoin_not_running():
|
||||
@@ -22,7 +22,7 @@ def test_can_connect_to_bitcoind():
|
||||
|
||||
def test_bitcoin_cli():
|
||||
try:
|
||||
bitcoin_cli().help()
|
||||
bitcoin_cli(bitcoind_connect_params).help()
|
||||
assert True
|
||||
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user