mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 14:14:22 +01:00
Updates tests to use ChainMonitor as global fixture
This commit is contained in:
@@ -15,6 +15,7 @@ from pisa.responder import TransactionTracker
|
||||
from pisa.watcher import Watcher
|
||||
from pisa.tools import bitcoin_cli
|
||||
from pisa.db_manager import DBManager
|
||||
from pisa.chain_monitor import ChainMonitor
|
||||
from common.appointment import Appointment
|
||||
|
||||
from bitcoind_mock.utils import sha256d
|
||||
@@ -50,6 +51,17 @@ def db_manager():
|
||||
rmtree("test_db")
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def chain_monitor():
|
||||
chain_monitor = ChainMonitor()
|
||||
chain_monitor.monitor_chain()
|
||||
|
||||
yield chain_monitor
|
||||
|
||||
chain_monitor.terminate = True
|
||||
generate_block()
|
||||
|
||||
|
||||
def generate_keypair():
|
||||
client_sk = ec.generate_private_key(ec.SECP256K1, default_backend())
|
||||
client_pk = client_sk.public_key()
|
||||
|
||||
Reference in New Issue
Block a user