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

[mod] #396: Remove async kw from tests/patched

parent 02debefd
No related branches found
No related tags found
No related merge requests found
......@@ -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
......@@ -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.
......
......@@ -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
......@@ -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,
......
......@@ -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:
......
......@@ -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)))
......
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