diff --git a/silkaj/cli.py b/silkaj/cli.py index ca6aed1008a5ab18e07977187f941a3a78e32799..c80ccac52be41dcdcffc000b8f4b220bcbd08d80 100644 --- a/silkaj/cli.py +++ b/silkaj/cli.py @@ -34,8 +34,8 @@ from silkaj.constants import ( from silkaj.g1_monetary_license import license_command from silkaj.membership import send_membership from silkaj.money.balance import cmd_amount +from silkaj.money.history import transaction_history from silkaj.money.transfer import send_transaction -from silkaj.tx_history import transaction_history from silkaj.wot import id_pubkey_correspondence, received_sent_certifications diff --git a/silkaj/tx_history.py b/silkaj/money/history.py similarity index 100% rename from silkaj/tx_history.py rename to silkaj/money/history.py diff --git a/tests/test_tx_history.py b/tests/money/test_history.py similarity index 92% rename from tests/test_tx_history.py rename to tests/money/test_history.py index 8b0ab52b1b50dcc6d7a9cd5bd7f21083f6719726..f05b36330a7cbc1c7ab627f3d1bfe4446a2b5e78 100644 --- a/tests/test_tx_history.py +++ b/tests/money/test_history.py @@ -15,9 +15,10 @@ import pytest -from silkaj import tx_history, wot_tools +from silkaj import wot_tools from silkaj.constants import PUBKEY_MAX_LENGTH, PUBKEY_MIN_LENGTH, SHORT_PUBKEY_SIZE from silkaj.crypto_tools import CHECKSUM_SIZE +from silkaj.money import history from tests.patched.blockchain_tools import currency from tests.patched.tx_history import patched_get_transactions_history from tests.patched.wot import patched_identities_from_pubkeys @@ -35,7 +36,7 @@ MAX_FULL_PUBKEY_LENGTH_WITH_CHECKSUM = ( ) # char `:` ==> 44 + 3 + 1 = 48 -def test_tx_history_generate_txs_list_and_pubkey_uid_display(monkeypatch): +def test_history_generate_txs_list_and_pubkey_uid_display(monkeypatch): def min_pubkey_length_with_uid(pubkey): # uid is at least one char : "<uid> - <pubkey>" adds min 4 chars to <pubkey> return pubkey + 4 @@ -53,7 +54,7 @@ def test_tx_history_generate_txs_list_and_pubkey_uid_display(monkeypatch): patched_get_transactions_history(client, pubkey, received_txs, sent_txs) # simple table - txs_list = tx_history.generate_txs_list( + txs_list = history.generate_txs_list( received_txs, sent_txs, pubkey, @@ -68,7 +69,7 @@ def test_tx_history_generate_txs_list_and_pubkey_uid_display(monkeypatch): assert len(tx_list[1]) == SHORT_PUBKEY_LENGTH_WITH_CHECKSUM # with uids - txs_list_uids = tx_history.generate_txs_list( + txs_list_uids = history.generate_txs_list( received_txs, sent_txs, pubkey, @@ -91,7 +92,7 @@ def test_tx_history_generate_txs_list_and_pubkey_uid_display(monkeypatch): assert len(txs_list_uids[3][1]) == SHORT_PUBKEY_LENGTH_WITH_CHECKSUM # with full pubkeys - txs_list_full = tx_history.generate_txs_list( + txs_list_full = history.generate_txs_list( received_txs, sent_txs, pubkey, @@ -111,7 +112,7 @@ def test_tx_history_generate_txs_list_and_pubkey_uid_display(monkeypatch): ) # with full pubkeys and uids - txs_list_uids_full = tx_history.generate_txs_list( + txs_list_uids_full = history.generate_txs_list( received_txs, sent_txs, pubkey, @@ -160,4 +161,4 @@ def test_tx_history_generate_txs_list_and_pubkey_uid_display(monkeypatch): ], ) def test_prefix(tx_addresses, outputs, occurence, return_value): - assert tx_history.prefix(tx_addresses, outputs, occurence) == return_value + assert history.prefix(tx_addresses, outputs, occurence) == return_value