mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-18 14:44:21 +01:00
Updates conftest fixtures so they do not autorun
The modules that need to run either bitcoind or the api do now reference to the fixture in the first test that needs it. Since the fixtures are definexd session-wise the rest of the modules will have access to them from that point on.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import pytest
|
||||
import logging
|
||||
from os import urandom
|
||||
from uuid import uuid4
|
||||
from hashlib import sha256
|
||||
@@ -6,6 +7,8 @@ from binascii import unhexlify
|
||||
|
||||
from pisa.block_processor import BlockProcessor
|
||||
|
||||
logging.getLogger().disabled = True
|
||||
|
||||
APPOINTMENT_COUNT = 100
|
||||
TEST_SET_SIZE = 200
|
||||
|
||||
@@ -25,7 +28,7 @@ def best_block_hash():
|
||||
return BlockProcessor.get_best_block_hash()
|
||||
|
||||
|
||||
def test_get_best_block_hash(best_block_hash):
|
||||
def test_get_best_block_hash(run_bitcoind, best_block_hash):
|
||||
# As long as bitcoind is running (or mocked in this case) we should always a block hash
|
||||
assert best_block_hash is not None and isinstance(best_block_hash, str)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user