From 00e4979c67d0e17c763d6e2735d2da732e6337d8 Mon Sep 17 00:00:00 2001 From: matograine <tom.ngr@zaclys.net> Date: Fri, 23 Apr 2021 18:59:48 +0200 Subject: [PATCH] [enh] #203 remove tabulate from tx.py --- silkaj/tx.py | 6 +++--- tests/test_unit_tx.py | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/silkaj/tx.py b/silkaj/tx.py index 1dae94a2..d29ba3cb 100644 --- a/silkaj/tx.py +++ b/silkaj/tx.py @@ -18,7 +18,6 @@ along with Silkaj. If not, see <https://www.gnu.org/licenses/>. from re import compile, search import math from asyncio import sleep -from tabulate import tabulate import click from silkaj import cli_tools @@ -150,7 +149,9 @@ async def send_transaction( ) if not yes: - confirmation_table = tabulate( + table = tui.create_table() + confirmation_table = tui.vert_table( + table, await gen_confirmation_table( issuer_pubkey, pubkey_amount[0], @@ -159,7 +160,6 @@ async def send_transaction( outputbackchange, comment, ), - tablefmt="fancy_grid", ) if yes or click.confirm( diff --git a/tests/test_unit_tx.py b/tests/test_unit_tx.py index 62fc092c..8f4c6188 100644 --- a/tests/test_unit_tx.py +++ b/tests/test_unit_tx.py @@ -1048,7 +1048,7 @@ def test_send_transaction( return args_list # mocking functions - patched_gen_confirmation_table = AsyncMock(return_value=None) + patched_gen_confirmation_table = AsyncMock(return_value=["mock list"]) patched_handle_intermediaries_transactions = AsyncMock(return_value=None) # patching functions @@ -1111,8 +1111,6 @@ def test_send_transaction( # generate_and_send_transaction() - - @pytest.mark.parametrize( "key, issuers, tx_amounts, listinput_and_amount, outputAddresses, Comment, OutputbackChange, client_return", [ -- GitLab