Skip to content
Snippets Groups Projects
Commit af550fdc authored by Moul's avatar Moul
Browse files

Move tx_history.py to money.history.py (#330)

parent 3266ba0f
No related branches found
No related tags found
1 merge request!216#330: Restructure repository
......@@ -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
......
File moved
......@@ -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
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