From b3aa413e784ee54d9e660ba26f7a48b9eefef083 Mon Sep 17 00:00:00 2001 From: Ouziel Slama Date: Thu, 2 Jan 2025 11:18:32 +0000 Subject: [PATCH] fix pytest --- .../counterpartycore/lib/composer.py | 2 +- .../test/fixtures/contract_vectors/composer.py | 17 ++++++++++------- .../test/regtest/regtestnode.py | 3 +++ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/counterparty-core/counterpartycore/lib/composer.py b/counterparty-core/counterpartycore/lib/composer.py index d38782ce1..9c29156f2 100644 --- a/counterparty-core/counterpartycore/lib/composer.py +++ b/counterparty-core/counterpartycore/lib/composer.py @@ -332,7 +332,7 @@ def complete_unspent_list(unspent_list): txid = utxo["txid"] if txid not in txs: raise exceptions.ComposeError( - f"invalid UTXO: {txid}:{utxo['vout']} (transaction not found)" + f"invalid UTXOs: {txid}:{utxo['vout']} (transaction not found)" ) for vout in txs[txid]["vout"]: if vout["n"] == utxo["vout"]: diff --git a/counterparty-core/counterpartycore/test/fixtures/contract_vectors/composer.py b/counterparty-core/counterpartycore/test/fixtures/contract_vectors/composer.py index cb9f02b59..cf318275b 100644 --- a/counterparty-core/counterpartycore/test/fixtures/contract_vectors/composer.py +++ b/counterparty-core/counterpartycore/test/fixtures/contract_vectors/composer.py @@ -581,28 +581,31 @@ ), "error": ( exceptions.ComposeError, - "invalid UTXO: ae241be7be83ebb14902757ad94854f787d9730fc553d6f695346c9375c0d8c2:0 (transaction not found)", + "invalid UTXOs: ae241be7be83ebb14902757ad94854f787d9730fc553d6f695346c9375c0d8c2:0 (transaction not found)", ), }, ], "prepare_inputs_set": [ { "in": ("aabb",), - "error": (exceptions.ComposeError, "invalid UTXO: aabb (invalid format)"), + "error": (exceptions.ComposeError, "invalid UTXOs: aabb (invalid format)"), }, { "in": ("aa:bb:cc:dd:ee",), - "error": (exceptions.ComposeError, "invalid UTXO: aa:bb:cc:dd:ee (invalid format)"), + "error": ( + exceptions.ComposeError, + "invalid UTXOs: aa:bb:cc:dd:ee (invalid format)", + ), }, { "in": ("aa:3:cc:dd",), - "error": (exceptions.ComposeError, "invalid UTXO: aa:3:cc:dd (invalid format)"), + "error": (exceptions.ComposeError, "invalid UTXOs: aa:3:cc:dd (invalid format)"), }, { "in": ("ae241be7be83ebb14902757ad94854f787d9730fc553d6f695346c9375c0d8c1:0:aa",), "error": ( exceptions.ComposeError, - "invalid UTXO: ae241be7be83ebb14902757ad94854f787d9730fc553d6f695346c9375c0d8c1:0:aa (invalid value)", + "invalid UTXOs: ae241be7be83ebb14902757ad94854f787d9730fc553d6f695346c9375c0d8c1:0:aa (invalid value)", ), }, { @@ -611,7 +614,7 @@ ), "error": ( exceptions.ComposeError, - "invalid UTXO: ae241be7be83ebb14902757ad94854f787d9730fc553d6f695346c9375c0d8c1:0:100:aagh (invalid script_pub_key)", + "invalid UTXOs: ae241be7be83ebb14902757ad94854f787d9730fc553d6f695346c9375c0d8c1:0:100:aagh (invalid script_pub_key)", ), }, { @@ -660,7 +663,7 @@ "in": ("ae241be7be83ebb14902757ad94854f787d9730fc553d6f695346c9375c0d8c2:0",), "error": ( exceptions.ComposeError, - "invalid UTXO: ae241be7be83ebb14902757ad94854f787d9730fc553d6f695346c9375c0d8c2:0 (not found in the database or Bitcoin Core)", + "invalid UTXOs: ae241be7be83ebb14902757ad94854f787d9730fc553d6f695346c9375c0d8c2:0 (not found in the database or Bitcoin Core)", ), }, ], diff --git a/counterparty-core/counterpartycore/test/regtest/regtestnode.py b/counterparty-core/counterpartycore/test/regtest/regtestnode.py index ba3c1a69e..59602bc8f 100644 --- a/counterparty-core/counterpartycore/test/regtest/regtestnode.py +++ b/counterparty-core/counterpartycore/test/regtest/regtestnode.py @@ -876,6 +876,9 @@ def test_transaction_chaining(self): def test_asset_conservation(self): self.test_command("check-db") + def test_fee_calculation(self): + pass + class RegtestNodeThread(threading.Thread): def __init__(self, wsgi_server="waitress", burn_in_one_block=True):