Skip to content

Commit 73b101b

Browse files
committed
Missed a couple
1 parent 101bf2a commit 73b101b

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

chia/_tests/cmds/wallet/test_wallet.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
CATSpend,
5252
CATSpendResponse,
5353
ClawbackPuzzleDecoratorOverride,
54+
CreateNewWallet,
55+
CreateNewWalletType,
5456
CreateOfferForIDs,
5557
CreateOfferForIDsResponse,
5658
DeleteUnconfirmedTransactions,
@@ -83,6 +85,7 @@
8385
TakeOffer,
8486
TakeOfferResponse,
8587
TransactionRecordWithMetadata,
88+
WalletCreationMode,
8689
WalletInfoResponse,
8790
)
8891
from chia.wallet.wallet_spend_bundle import WalletSpendBundle
@@ -707,10 +710,6 @@ def test_add_token(capsys: object, get_test_cli_clients: tuple[TestRpcClients, P
707710

708711
# set RPC Client
709712
class AddTokenRpcClient(TestWalletRpcClient):
710-
async def create_wallet_for_existing_cat(self, asset_id: bytes) -> dict[str, int]:
711-
self.add_to_log("create_wallet_for_existing_cat", (asset_id,))
712-
return {"wallet_id": 3}
713-
714713
async def set_cat_name(self, request: CATSetName) -> CATSetNameResponse:
715714
self.add_to_log("set_cat_name", (request.wallet_id, request.name))
716715
return CATSetNameResponse(wallet_id=request.wallet_id)
@@ -728,7 +727,19 @@ async def set_cat_name(self, request: CATSetName) -> CATSetNameResponse:
728727

729728
expected_calls: logType = {
730729
"cat_asset_id_to_name": [(get_bytes32(1),), (bytes32([1, 2] * 16),)],
731-
"create_wallet_for_existing_cat": [(bytes32([1, 2] * 16),)],
730+
"create_new_wallet": [
731+
(
732+
CreateNewWallet(
733+
wallet_type=CreateNewWalletType.CAT_WALLET,
734+
mode=WalletCreationMode.EXISTING,
735+
asset_id=bytes32([1, 2] * 16),
736+
push=True,
737+
),
738+
DEFAULT_TX_CONFIG,
739+
tuple(),
740+
ConditionValidTimes(),
741+
)
742+
],
732743
"set_cat_name": [(2, "examplecat"), (3, "examplecat")],
733744
}
734745
test_rpc_clients.wallet_rpc_client.check_log(expected_calls)

chia/_tests/pools/test_pool_cmdline.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -992,9 +992,7 @@ async def test_plotnft_cli_misc(mocker: MockerFixture, consensus_mode: Consensus
992992
)
993993

994994
# Test fall-through raise in create
995-
mocker.patch.object(
996-
test_rpc_client, "create_new_pool_wallet", create=True, side_effect=ValueError("Injected error")
997-
)
995+
mocker.patch.object(test_rpc_client, "create_new_wallet", create=True, side_effect=ValueError("Injected error"))
998996
with pytest.raises(CliRpcConnectionError, match="Error creating plot NFT: Injected error"):
999997
await create(
1000998
wallet_info=WalletClientInfo(client=cast(WalletRpcClient, test_rpc_client), fingerprint=0, config=dict()),

0 commit comments

Comments
 (0)