From ea74b5296ce6a390760c1448aa33728cadca1105 Mon Sep 17 00:00:00 2001 From: Dowland Aiello Date: Thu, 18 Jul 2024 12:27:50 -0700 Subject: [PATCH] Assert balances after transfer test. --- .../tests/transfer_osmosis.py | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/local-interchaintest/tests/transfer_osmosis.py b/local-interchaintest/tests/transfer_osmosis.py index 0068f29be..b0bba19a2 100644 --- a/local-interchaintest/tests/transfer_osmosis.py +++ b/local-interchaintest/tests/transfer_osmosis.py @@ -5,11 +5,12 @@ from src.contracts.route import Route, Status, Leg from src.contracts.auction import AuctionProvider from src.scheduler import Ctx -from src.util import ContractInfo +from src.util import ContractInfo, try_multiple_clients +from src.util import custom_neutron_network_config import aiohttp from cosmpy.aerial.client import LedgerClient from cosmpy.aerial.wallet import LocalWallet -from src.util import custom_neutron_network_config +from cosmpy.crypto.address import Address async def main() -> None: @@ -64,6 +65,22 @@ async def main() -> None: 1, ) + balance_after_resp = try_multiple_clients( + ctx.clients[list(ctx.deployments["pools"]["osmosis"].keys())[0]], + lambda client: client.query_bank_balance( + Address( + ctx.wallet.public_key(), + prefix=list(ctx.deployments["pools"]["osmosis"].values())[0][ + "chain_prefix" + ], + ), + ctx.cli_args["base_denom"], + ), + ) + + assert balance_after_resp + assert balance_after_resp == 1 + if __name__ == "__main__": loop = asyncio.get_event_loop()