diff --git a/tests/patched/blockchain_tools.py b/tests/patched/blockchain_tools.py index 9d2ac60e439171cc949739dd29e0c960ad868a7d..2f6e6eabcc5ceea3198b7cbe68dd7810db94d7b4 100644 --- a/tests/patched/blockchain_tools.py +++ b/tests/patched/blockchain_tools.py @@ -32,17 +32,17 @@ fake_block_uid = BlockUID( ) -async def patched_params(self): +def patched_params(self): return { "msValidity": 31557600, "msPeriod": 5259600, } -async def patched_block(self, number): +def patched_block(self, number): return mocked_block ## mock head_block() -async def patched_head_block(self): +def patched_head_block(self): return mocked_block diff --git a/tests/patched/money.py b/tests/patched/money.py index 04507123a3534f50bd3e694ce7eb3393b59fa6a9..ccf0488bd553f2aad79f98b0b8cbb9bb30831018 100644 --- a/tests/patched/money.py +++ b/tests/patched/money.py @@ -40,12 +40,12 @@ from silkaj.money import amount_in_current_base from silkaj.tx import MAX_INPUTS_PER_TX -async def patched_ud_value(self): +def patched_ud_value(self): return mock_ud_value # mock get_sources() -async def patched_get_sources(pubkey): +def patched_get_sources(pubkey): """ Returns transaction sources. This function doesn't cover all possibilities : only SIG() unlock condition. diff --git a/tests/patched/tools.py b/tests/patched/tools.py index 8f8ec081f09d7cbc06bbc72b416635fd75dc86f9..756148346941b10aaa67ece3c6fa490de9667199 100644 --- a/tests/patched/tools.py +++ b/tests/patched/tools.py @@ -17,5 +17,5 @@ from silkaj.constants import G1_SYMBOL # mock CurrencySymbol().symbol -async def patched_currency_symbol(self): +def patched_currency_symbol(self): return G1_SYMBOL diff --git a/tests/patched/tx.py b/tests/patched/tx.py index 3a17bd2385e8cca8f1f725635ef3740dad081c72..18160c168dc9243e2c40a25553ceef6fbebfd11d 100644 --- a/tests/patched/tx.py +++ b/tests/patched/tx.py @@ -18,7 +18,7 @@ from duniterpy.key import SigningKey from silkaj.tools import message_exit -async def patched_gen_confirmation_table( +def patched_gen_confirmation_table( issuer_pubkey, pubkey_amount, tx_amounts, @@ -43,7 +43,7 @@ async def patched_gen_confirmation_table( ) -async def patched_handle_intermediaries_transactions( +def patched_handle_intermediaries_transactions( key, issuers, tx_amounts, @@ -68,7 +68,7 @@ async def patched_handle_intermediaries_transactions( ) -async def patched_generate_and_send_transaction( +def patched_generate_and_send_transaction( key, issuers, tx_amounts, diff --git a/tests/patched/tx_history.py b/tests/patched/tx_history.py index c61ecfa7d7cf2c0c0f65e4f40d4f1b2c2e6f55b2..b677b1689402ffec503f18328d95c29ab4a1b25f 100644 --- a/tests/patched/tx_history.py +++ b/tests/patched/tx_history.py @@ -110,7 +110,7 @@ fake_sent_tx_hist = [ ] -async def patched_get_transactions_history(client, pubkey, received_txs, sent_txs): +def patched_get_transactions_history(client, pubkey, received_txs, sent_txs): for received in fake_received_tx_hist: received_txs.append(Transaction.from_bma_history(currency, received)) for sent in fake_sent_tx_hist: diff --git a/tests/patched/wot.py b/tests/patched/wot.py index 86924488e58cdf7ab4a406d044ffc723be936d5e..4bf3e37d0b730054dd90d1fe0dd4541ccdb60366 100644 --- a/tests/patched/wot.py +++ b/tests/patched/wot.py @@ -27,7 +27,7 @@ pubkey_list = [ # mock is_member -async def patched_is_member(pubkey): +def patched_is_member(pubkey): for account in pubkey_list: if account["pubkey"] == pubkey: if account["uid"]: @@ -36,7 +36,7 @@ async def patched_is_member(pubkey): # patch wot requirements -async def patched_wot_requirements_one_pending(pubkey, identity_uid): +def patched_wot_requirements_one_pending(pubkey, identity_uid): return { "identities": [ { @@ -59,7 +59,7 @@ async def patched_wot_requirements_one_pending(pubkey, identity_uid): } -async def patched_wot_requirements_no_pending(pubkey, identity_uid): +def patched_wot_requirements_no_pending(pubkey, identity_uid): return { "identities": [ { @@ -73,7 +73,7 @@ async def patched_wot_requirements_no_pending(pubkey, identity_uid): # for history -async def patched_identities_from_pubkeys(pubkeys, uids): +def patched_identities_from_pubkeys(pubkeys, uids): if not uids: return list() uniq_pubkeys = list(filter(None, set(pubkeys)))