mirror of
https://github.com/aljazceru/python-teos.git
synced 2026-02-10 09:04:26 +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 time import sleep
|
||||
|
||||
@@ -6,6 +7,8 @@ from pisa.carrier import Carrier
|
||||
from pisa.rpc_errors import RPC_VERIFY_ALREADY_IN_CHAIN, RPC_DESERIALIZATION_ERROR
|
||||
from test.simulator.bitcoind_sim import TIME_BETWEEN_BLOCKS
|
||||
|
||||
logging.getLogger().disabled = True
|
||||
|
||||
# FIXME: This test do not fully cover the carrier since the simulator does not support every single error bitcoind may
|
||||
# return for RPC_VERIFY_REJECTED and RPC_VERIFY_ERROR. Further development of the simulator / mocks or simulation
|
||||
# with bitcoind is required
|
||||
@@ -19,7 +22,7 @@ def carrier():
|
||||
return Carrier()
|
||||
|
||||
|
||||
def test_send_transaction(carrier):
|
||||
def test_send_transaction(run_bitcoind, carrier):
|
||||
# We are mocking bitcoind and in our simulator txid == tx
|
||||
tx = urandom(32).hex()
|
||||
receipt = carrier.send_transaction(tx, tx)
|
||||
|
||||
Reference in New Issue
Block a user