From 0af6cf93dfc1d7dc93d02abb22e8dae3ec5c8dcc Mon Sep 17 00:00:00 2001 From: yihuang Date: Tue, 20 Feb 2024 18:04:00 +0800 Subject: [PATCH] fix format --- integration_tests/test_ibc_rly.py | 39 ++++++++++++++----------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/integration_tests/test_ibc_rly.py b/integration_tests/test_ibc_rly.py index abe7e88d58..6d526a9858 100644 --- a/integration_tests/test_ibc_rly.py +++ b/integration_tests/test_ibc_rly.py @@ -57,24 +57,35 @@ def ibc(request, tmp_path_factory): ) +def amount_dict(amt, denom): + return [ + AttributeDict( + { + "amount": amt, + "denom": denom, + } + ) + ] + + def coin_received(receiver, amt, denom): return { "receiver": receiver, - "amount": [(amt, denom)], + "amount": amount_dict(amt, denom), } def coin_base(minter, amt, denom): return { "minter": minter, - "amount": [(amt, denom)], + "amount": amount_dict(amt, denom), } def coin_spent(spender, amt, denom): return { "spender": spender, - "amount": [(amt, denom)], + "amount": amount_dict(amt, denom), } @@ -98,14 +109,14 @@ def transfer(src, dst, amt, denom): return { "recipient": dst, "sender": src, - "amount": [(amt, denom)], + "amount": amount_dict(amt, denom), } def burn(burner, amt, denom): return { "burner": burner, - "amount": [(amt, denom)], + "amount": amount_dict(amt, denom), } @@ -121,14 +132,7 @@ def recv_packet(seq, src, dst, amt, denom): { "receiver": dst, "sender": src, - "amount": [ - AttributeDict( - { - "amount": amt, - "denom": denom, - } - ) - ], + "amount": amount_dict(amt, denom), } ), } @@ -163,14 +167,7 @@ def write_ack(seq, src, dst, amt, denom): { "receiver": dst, "sender": src, - "amount": [ - AttributeDict( - { - "amount": amt, - "denom": denom, - } - ) - ], + "amount": amount_dict(amt, denom), } ), }