mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 14:14:22 +01:00
Moves start api to test_api since it was the only place where it's used
This commit is contained in:
@@ -8,9 +8,7 @@ from hashlib import sha256
|
||||
from binascii import unhexlify
|
||||
|
||||
from apps.cli.blob import Blob
|
||||
from pisa.api import start_api
|
||||
from pisa.responder import Job
|
||||
from pisa.watcher import Watcher
|
||||
from pisa.tools import bitcoin_cli
|
||||
from pisa.db_manager import DBManager
|
||||
from pisa.appointment import Appointment
|
||||
@@ -29,18 +27,6 @@ def run_bitcoind():
|
||||
sleep(0.1)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def run_api(db_manager):
|
||||
watcher = Watcher(db_manager)
|
||||
|
||||
api_thread = Thread(target=start_api, args=[watcher])
|
||||
api_thread.daemon = True
|
||||
api_thread.start()
|
||||
|
||||
# It takes a little bit of time to start the API (otherwise the requests are sent too early and they fail)
|
||||
sleep(0.1)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
def prng_seed():
|
||||
random.seed(0)
|
||||
|
||||
Reference in New Issue
Block a user