mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 14:14:22 +01:00
Enables stdout for unit tests
By default pytests does not capture stdout, but it can do with -s. It is nice to have the option to verbose the tests if needed
This commit is contained in:
@@ -8,7 +8,7 @@ from cryptography.hazmat.primitives import serialization
|
||||
from pisa.api import API
|
||||
from pisa.watcher import Watcher
|
||||
from pisa.tools import bitcoin_cli
|
||||
from pisa import HOST, PORT, c_logger
|
||||
from pisa import HOST, PORT
|
||||
from pisa.conf import MAX_APPOINTMENTS
|
||||
|
||||
from test.pisa.unit.conftest import (
|
||||
@@ -21,7 +21,6 @@ from test.pisa.unit.conftest import (
|
||||
|
||||
from common.constants import LOCATOR_LEN_BYTES
|
||||
|
||||
c_logger.disabled = True
|
||||
|
||||
PISA_API = "http://{}:{}".format(HOST, PORT)
|
||||
MULTIPLE_APPOINTMENTS = 10
|
||||
|
||||
@@ -4,8 +4,6 @@ from pisa import c_logger
|
||||
from apps.cli.blob import Blob
|
||||
from test.pisa.unit.conftest import get_random_value_hex
|
||||
|
||||
c_logger.disabled = True
|
||||
|
||||
|
||||
def test_init_blob():
|
||||
data = get_random_value_hex(64)
|
||||
|
||||
@@ -4,7 +4,6 @@ from pisa import c_logger
|
||||
from pisa.block_processor import BlockProcessor
|
||||
from test.pisa.unit.conftest import get_random_value_hex, generate_block, generate_blocks
|
||||
|
||||
c_logger.disabled = True
|
||||
|
||||
hex_tx = (
|
||||
"0100000001c997a5e56e104102fa209c6a852dd90660a20b2d9c352423edce25857fcd3704000000004847304402"
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
from uuid import uuid4
|
||||
|
||||
from pisa import c_logger
|
||||
from pisa.builder import Builder
|
||||
from test.pisa.unit.conftest import get_random_value_hex, generate_dummy_appointment, generate_dummy_tracker
|
||||
|
||||
c_logger.disabled = True
|
||||
|
||||
|
||||
def test_build_appointments():
|
||||
appointments_data = {}
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import pytest
|
||||
|
||||
from pisa import c_logger
|
||||
from pisa.carrier import Carrier
|
||||
from test.simulator.utils import sha256d
|
||||
from test.simulator.transaction import TX
|
||||
from test.pisa.unit.conftest import generate_blocks, get_random_value_hex
|
||||
from pisa.rpc_errors import RPC_VERIFY_ALREADY_IN_CHAIN, RPC_DESERIALIZATION_ERROR
|
||||
|
||||
c_logger.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
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import random
|
||||
from uuid import uuid4
|
||||
|
||||
from pisa import c_logger
|
||||
from pisa.responder import TransactionTracker
|
||||
from pisa.cleaner import Cleaner
|
||||
from common.appointment import Appointment
|
||||
@@ -16,8 +15,6 @@ ITEMS = 10
|
||||
MAX_ITEMS = 100
|
||||
ITERATIONS = 10
|
||||
|
||||
c_logger.disabled = True
|
||||
|
||||
|
||||
# WIP: FIX CLEANER TESTS AFTER ADDING delete_complete_appointment
|
||||
def set_up_appointments(db_manager, total_appointments):
|
||||
|
||||
@@ -4,7 +4,6 @@ import pytest
|
||||
import shutil
|
||||
from uuid import uuid4
|
||||
|
||||
from pisa import c_logger
|
||||
from pisa.db_manager import DBManager
|
||||
from pisa.db_manager import WATCHER_LAST_BLOCK_KEY, RESPONDER_LAST_BLOCK_KEY, LOCATOR_MAP_PREFIX
|
||||
|
||||
@@ -12,8 +11,6 @@ from common.constants import LOCATOR_LEN_BYTES
|
||||
|
||||
from test.pisa.unit.conftest import get_random_value_hex, generate_dummy_appointment
|
||||
|
||||
c_logger.disabled = True
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def watcher_appointments():
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
from pisa import c_logger
|
||||
from pisa.encrypted_blob import EncryptedBlob
|
||||
from test.pisa.unit.conftest import get_random_value_hex
|
||||
|
||||
c_logger.disabled = True
|
||||
|
||||
|
||||
def test_init_encrypted_blob():
|
||||
# No much to test here, basically that the object is properly created
|
||||
|
||||
@@ -4,7 +4,6 @@ from cryptography.hazmat.backends import default_backend
|
||||
from cryptography.hazmat.primitives.asymmetric import ec
|
||||
from cryptography.hazmat.primitives import serialization
|
||||
|
||||
from pisa import c_logger
|
||||
from pisa.errors import *
|
||||
from pisa.inspector import Inspector
|
||||
from common.appointment import Appointment
|
||||
@@ -16,7 +15,6 @@ from test.pisa.unit.conftest import get_random_value_hex, generate_dummy_appoint
|
||||
from common.constants import LOCATOR_LEN_BYTES, LOCATOR_LEN_HEX
|
||||
from common.cryptographer import Cryptographer
|
||||
|
||||
c_logger.disabled = True
|
||||
|
||||
inspector = Inspector()
|
||||
APPOINTMENT_OK = (0, None)
|
||||
|
||||
@@ -7,7 +7,6 @@ from copy import deepcopy
|
||||
from threading import Thread
|
||||
from queue import Queue, Empty
|
||||
|
||||
from pisa import c_logger
|
||||
from pisa.db_manager import DBManager
|
||||
from pisa.responder import Responder, TransactionTracker
|
||||
from pisa.block_processor import BlockProcessor
|
||||
@@ -20,8 +19,6 @@ from test.simulator.utils import sha256d
|
||||
from test.simulator.bitcoind_sim import TX
|
||||
from test.pisa.unit.conftest import generate_block, generate_blocks, get_random_value_hex
|
||||
|
||||
c_logger.disabled = True
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def responder(db_manager):
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
from pisa import c_logger
|
||||
from pisa.tools import can_connect_to_bitcoind, in_correct_network, bitcoin_cli
|
||||
|
||||
from common.tools import check_sha256_hex_format
|
||||
|
||||
c_logger.disabled = True
|
||||
|
||||
|
||||
def test_in_correct_network(run_bitcoind):
|
||||
# The simulator runs as if it was regtest, so every other network should fail
|
||||
|
||||
@@ -4,7 +4,6 @@ from threading import Thread
|
||||
from queue import Queue, Empty
|
||||
from cryptography.hazmat.primitives import serialization
|
||||
|
||||
from pisa import c_logger
|
||||
from pisa.watcher import Watcher
|
||||
from pisa.responder import Responder
|
||||
from pisa.tools import bitcoin_cli
|
||||
@@ -20,7 +19,6 @@ from pisa.conf import EXPIRY_DELTA, MAX_APPOINTMENTS
|
||||
from common.tools import check_sha256_hex_format
|
||||
from common.cryptographer import Cryptographer
|
||||
|
||||
c_logger.disabled = True
|
||||
|
||||
APPOINTMENTS = 5
|
||||
START_TIME_OFFSET = 1
|
||||
|
||||
Reference in New Issue
Block a user