Commit 7ed8dae0 authored by matograine's avatar matograine

updating

parent 8e33f014
Pipeline #6778 failed with stages
in 1 minute and 27 seconds
......@@ -55,13 +55,13 @@ async def test_display_pubkey(message, pubkey, id):
expected = [[message + " (pubkey)", pubkey], [message + " (id)", id]]
tx = list()
await display_pubkey(tx, message, pubkey)
print("DEBUG : tx : ", tx) # to see if display_pubkey gets tgi ID
print("DEBUG : tx : ", tx) # to see if display_pubkey gets the ID
assert tx == expected
# display_output_and_amount()
@pytest.mark.parametrize(
"outputAddresses, tx_amount, currency_symbol, ids",
"outputAddresses, amount, currency_symbol, ids",
[
(["CmFKubyqbmJWbhyH2eEPVSSs4H4NeXGDfrETzEnRFtPd"], 1000, "Ğ1", ["Matograine"]),
(["d88fPFbDdJXJANHH7hedFMaRyGcnVZj9c5cDaE76LRN"], 1000, "Ğ1", [""]),
......@@ -78,9 +78,9 @@ async def test_display_pubkey(message, pubkey, id):
)
@pytest.mark.asyncio
async def test_display_output_and_amount(
outputAddresses, tx_amount, currency_symbol, ids
outputAddresses, amount, currency_symbol, ids
):
amount_UD = round(tx_amount / await UDValue().ud_value, 4)
amount_UD = round(amount / await UDValue().ud_value, 4)
expected = list()
if len(outputAddresses) == 1:
if ids(0) == "":
......@@ -88,7 +88,7 @@ async def test_display_output_and_amount(
["to (pubkey)", outputAddresses[0]],
[
"amount (unit | relative)",
str(tx_amount / 100)
str(amount / 100)
+ " "
+ currency_symbol
+ " || "
......@@ -102,7 +102,7 @@ async def test_display_output_and_amount(
["to (id)", ids(0)],
[
"amount (unit | relative)",
str(tx_amount / 100)
str(amount / 100)
+ " "
+ currency_symbol
+ " || "
......@@ -117,7 +117,7 @@ async def test_display_output_and_amount(
["to (pubkey)", outputAddress],
[
"amount (unit | relative)",
str(tx_amount / 100)
str(amount / 100)
+ " "
+ currency_symbol
+ " || "
......@@ -131,7 +131,7 @@ async def test_display_output_and_amount(
["to (id)", id],
[
"amount (unit | relative)",
str(tx_amount / 100)
str(amount / 100)
+ " "
+ currency_symbol
+ " || "
......@@ -140,5 +140,5 @@ async def test_display_output_and_amount(
],
)
tx = list()
await display_output_and_amount(tx, outputAddresses, tx_amount, currency_symbol)
await display_output_and_amount(tx, outputAddresses, amount, currency_symbol)
assert tx == expected
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment