Skip to content

Commit

Permalink
CHIA-1388 Check the cat list values from get_cat_list against the def…
Browse files Browse the repository at this point in the history
…ault cats in test_cat_endpoints (#18587)

Check the cat list values from get_cat_list against the default cats in test_cat_endpoints.
  • Loading branch information
AmineKhaldi authored Sep 24, 2024
1 parent a3e6bb4 commit c6630f9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion chia/_tests/wallet/rpc/test_wallet_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
from chia.rpc.rpc_server import RpcServer
from chia.rpc.wallet_request_types import (
CombineCoins,
DefaultCAT,
DIDGetPubkey,
GetNotifications,
SplitCoins,
Expand Down Expand Up @@ -1166,7 +1167,13 @@ async def test_cat_endpoints(wallet_rpc_environment: WalletRpcTestEnvironment):
assert len(selected_coins) > 0

# Test get_cat_list
assert len(DEFAULT_CATS) == len((await client.get_cat_list()).cat_list)
cat_list = (await client.get_cat_list()).cat_list
assert len(DEFAULT_CATS) == len(cat_list)
default_cats_set = {
DefaultCAT(asset_id=bytes32.from_hexstr(cat["asset_id"]), name=cat["name"], symbol=cat["symbol"])
for cat in DEFAULT_CATS.values()
}
assert default_cats_set == set(cat_list)


@pytest.mark.anyio
Expand Down

0 comments on commit c6630f9

Please sign in to comment.