Skip to content
Snippets Groups Projects
Commit 2e12cdae authored by matograine's avatar matograine Committed by Moul
Browse files

[enh] tx: Migrate from tabulate to texttable (#203)

parent 3380604f
No related branches found
No related tags found
1 merge request!199#203: Harmonize tables style using Texttable
......@@ -30,7 +30,6 @@ from duniterpy.documents import (
Unlock,
)
from duniterpy.key import SigningKey
from tabulate import tabulate
from silkaj import auth
from silkaj import blockchain_tools as bt
......@@ -168,7 +167,8 @@ No transaction sent."
)
if not yes:
confirmation_table = tabulate(
table = tui.Table()
table.fill_rows(
gen_confirmation_table(
issuer_pubkey,
pubkey_amount[0],
......@@ -177,8 +177,8 @@ No transaction sent."
outputbackchange,
comment,
),
tablefmt="fancy_grid",
)
confirmation_table = table.draw()
if yes or click.confirm(
f"{confirmation_table}\nDo you confirm sending this transaction?"
......
......@@ -974,7 +974,7 @@ def test_send_transaction(
"""
# mocking functions
patched_gen_confirmation_table = Mock(return_value=None)
patched_gen_confirmation_table = Mock(return_value=["mock list"])
patched_handle_intermediaries_transactions = Mock(return_value=None)
# patching functions
......@@ -1077,8 +1077,6 @@ def construct_args(
# generate_and_send_transaction()
@pytest.mark.parametrize(
"key, issuers, tx_amounts, listinput_and_amount, outputAddresses, Comment, OutputbackChange",
[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment