diff --git a/tests/money/test_transfer.py b/tests/money/test_transfer.py index d8e0e4eefe943315586bc11a4646e41791bb71c3..f1cc31a14e54426f3a1ccd358c1576d60c85c6da 100644 --- a/tests/money/test_transfer.py +++ b/tests/money/test_transfer.py @@ -26,12 +26,6 @@ from duniterpy.documents.transaction import ( Unlock, ) -from patched.auth import patched_auth_method -from patched.blockchain_tools import fake_block_id, patched_get_head_block -from patched.money import Counter, patched_get_sources, patched_get_ud_value -from patched.test_constants import mock_ud_value -from patched.tools import patched_get_currency_symbol -from patched.wot import patched_is_member from silkaj import auth, network_tools, tools, wot_tools from silkaj.blockchain import tools as bc_tools from silkaj.cli import cli @@ -39,6 +33,12 @@ from silkaj.constants import CENT_MULT_TO_UNIT, G1_SYMBOL from silkaj.money import tools as m_tools from silkaj.money import transfer from silkaj.tui import display_amount, display_pubkey +from tests.patched.auth import patched_auth_method +from tests.patched.blockchain_tools import fake_block_id, patched_get_head_block +from tests.patched.money import Counter, patched_get_sources, patched_get_ud_value +from tests.patched.test_constants import mock_ud_value +from tests.patched.tools import patched_get_currency_symbol +from tests.patched.wot import patched_is_member # Values # fifi: HcRgKh4LwbQVYuAc3xAdCynYXpKoiPE6qdxCMa8JeHat : 53 TX, amount = 5300 diff --git a/tests/money/test_transfer_cli.py b/tests/money/test_transfer_cli.py index 789a1152aada282eb97f09cd804d0fb475676913..2c95c3f0fceb2f2421d69cd197b7f8f3fdb0d178 100644 --- a/tests/money/test_transfer_cli.py +++ b/tests/money/test_transfer_cli.py @@ -19,9 +19,6 @@ import pytest from click import pass_context from click.testing import CliRunner -from patched.auth import patched_auth_method -from patched.money import patched_get_sources, patched_get_ud_value -from patched.test_constants import mock_ud_value from silkaj import auth from silkaj.cli import cli from silkaj.constants import ( @@ -32,6 +29,9 @@ from silkaj.constants import ( ) from silkaj.money import tools as m_tools from silkaj.money import transfer +from tests.patched.auth import patched_auth_method +from tests.patched.money import patched_get_sources, patched_get_ud_value +from tests.patched.test_constants import mock_ud_value # create test auths diff --git a/tests/patched/money.py b/tests/patched/money.py index 17e279336bb073631e03ba8dceb626e481a84743..73e673fd6d420c882e808919dfeab78834e4a1b4 100644 --- a/tests/patched/money.py +++ b/tests/patched/money.py @@ -17,9 +17,9 @@ from duniterpy.documents.transaction import InputSource -from patched.test_constants import mock_ud_value from silkaj.money.tools import amount_in_current_base from silkaj.money.transfer import MAX_INPUTS_PER_TX +from tests.patched.test_constants import mock_ud_value def patched_get_ud_value(): diff --git a/tests/patched/tx_history.py b/tests/patched/tx_history.py index 608ab942e9315d9fcd416c42a18c8086bd9828b4..3451589cbceab7f63dfc8df6bcfe524d74826fbe 100644 --- a/tests/patched/tx_history.py +++ b/tests/patched/tx_history.py @@ -15,7 +15,7 @@ from duniterpy.documents.transaction import Transaction -from patched.blockchain_tools import currency +from tests.patched.blockchain_tools import currency fake_received_tx_hist = [ { diff --git a/tests/test_auth.py b/tests/test_auth.py index 0a4df549be52d05ba1fcc3bee9a343f06f4dfe29..b3154123d903f14b99342755c2a470bf2749c1a5 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -16,13 +16,13 @@ import click import pytest -from patched.auth import ( +from silkaj import auth +from tests.patched.auth import ( patched_auth_by_auth_file, patched_auth_by_scrypt, patched_auth_by_seed, patched_auth_by_wif, ) -from silkaj import auth # test auth_method diff --git a/tests/test_idty_tools.py b/tests/test_idty_tools.py index 0f7e0cd150e622656df560eb136145161e6690a4..e8961cb22b00e5c2263061dd3d4ac8990fbeee0f 100644 --- a/tests/test_idty_tools.py +++ b/tests/test_idty_tools.py @@ -22,7 +22,10 @@ from duniterpy.api import bma from duniterpy.documents.block_id import BlockID from duniterpy.documents.identity import Identity -from patched.idty_tools import ( +from silkaj import idty_tools +from silkaj.constants import ALL, PUBKEY_PATTERN +from silkaj.tui import gen_pubkey_checksum +from tests.patched.idty_tools import ( idty1, idty2, idty_block, @@ -30,9 +33,6 @@ from patched.idty_tools import ( lookup_three, lookup_two, ) -from silkaj import idty_tools -from silkaj.constants import ALL, PUBKEY_PATTERN -from silkaj.tui import gen_pubkey_checksum # used test identities diff --git a/tests/test_membership.py b/tests/test_membership.py index 4b287e5aa50bdd396515ee577f1b7e674c85a64d..8f1ed2e2aacb71f1e1ed1a51ce9a8f5091ee44e4 100644 --- a/tests/test_membership.py +++ b/tests/test_membership.py @@ -22,22 +22,22 @@ from duniterpy.api import bma from duniterpy.documents import Membership, get_block_id from duniterpy.key import SigningKey -from patched.blockchain_tools import ( +from silkaj import auth, membership, tui, wot +from silkaj.blockchain import tools as bc_tools +from silkaj.cli import cli +from silkaj.constants import DATE +from silkaj.network_tools import client_instance +from tests.patched.blockchain_tools import ( currency, fake_block_id, patched_block, patched_get_head_block, patched_params, ) -from patched.wot import ( +from tests.patched.wot import ( patched_wot_requirements_no_pending, patched_wot_requirements_one_pending, ) -from silkaj import auth, membership, tui, wot -from silkaj.blockchain import tools as bc_tools -from silkaj.cli import cli -from silkaj.constants import DATE -from silkaj.network_tools import client_instance # Values and patches PUBKEY = "EA7Dsw39ShZg4SpURsrgMaMqrweJPUFPYHwZA8e92e3D" diff --git a/tests/test_revocation.py b/tests/test_revocation.py index 10e7a86599b3d05bca94b4fec177740c2da1f1ff..2bef87b6787d3923d2660a3c6b7be5d85221db48 100644 --- a/tests/test_revocation.py +++ b/tests/test_revocation.py @@ -24,15 +24,15 @@ from click.testing import CliRunner from duniterpy.api import bma from duniterpy.documents.revocation import Revocation -from patched.auth import patched_auth_method -from patched.blockchain_tools import patched_get_head_block_gtest -from patched.idty_tools import idty1, idty2, idty_block, lookup_one, lookup_two from silkaj import auth, idty_tools, revocation, wot from silkaj.blockchain import tools as bc_tools from silkaj.cli import cli from silkaj.constants import FAILURE_EXIT_STATUS, SUCCESS_EXIT_STATUS from silkaj.network_tools import client_instance from silkaj.tui import gen_pubkey_checksum +from tests.patched.auth import patched_auth_method +from tests.patched.blockchain_tools import patched_get_head_block_gtest +from tests.patched.idty_tools import idty1, idty2, idty_block, lookup_one, lookup_two # Useful function diff --git a/tests/test_tui.py b/tests/test_tui.py index 0ea5e13e334ddbcdf9bcb93f2a0de79500c8e297..460337ab808200cb135ac1d94629d7cb1d0a4696 100644 --- a/tests/test_tui.py +++ b/tests/test_tui.py @@ -19,10 +19,10 @@ from collections import OrderedDict import pytest from texttable import Texttable -from patched.test_constants import mock_ud_value -from patched.wot import patched_is_member from silkaj import tui, wot_tools from silkaj.constants import G1_SYMBOL, SHORT_PUBKEY_SIZE +from tests.patched.test_constants import mock_ud_value +from tests.patched.wot import patched_is_member # display_amount() diff --git a/tests/test_tx_history.py b/tests/test_tx_history.py index adfafad69f957a31eb9f29f45836f1701423921e..8b0ab52b1b50dcc6d7a9cd5bd7f21083f6719726 100644 --- a/tests/test_tx_history.py +++ b/tests/test_tx_history.py @@ -15,12 +15,12 @@ import pytest -from patched.blockchain_tools import currency -from patched.tx_history import patched_get_transactions_history -from patched.wot import patched_identities_from_pubkeys from silkaj import tx_history, wot_tools from silkaj.constants import PUBKEY_MAX_LENGTH, PUBKEY_MIN_LENGTH, SHORT_PUBKEY_SIZE from silkaj.crypto_tools import CHECKSUM_SIZE +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 SHORT_PUBKEY_LENGTH_WITH_CHECKSUM = ( SHORT_PUBKEY_SIZE + CHECKSUM_SIZE + 2