diff --git a/tests/integration/sugar/test_account.py b/tests/integration/sugar/test_account.py index bed129100..1293f13f1 100644 --- a/tests/integration/sugar/test_account.py +++ b/tests/integration/sugar/test_account.py @@ -7,6 +7,7 @@ ) from tests.integration.reusable_values import DESTINATION, WALLET from xrpl.asyncio.account import does_account_exist, get_balance, get_latest_transaction +from xrpl.asyncio.clients.exceptions import XRPLRequestFailureException from xrpl.core.addresscodec import classic_address_to_xaddress from xrpl.models.transactions import Payment from xrpl.wallet import Wallet @@ -23,9 +24,15 @@ async def test_does_account_exist_true(self, client): @test_async_and_sync(globals(), ["xrpl.account.does_account_exist"]) async def test_does_account_exist_false(self, client): - address = "rG1QQv2nh2gr7RCZ1P8YYcBUcCCN633jCn" + address = Wallet.create().classic_address self.assertFalse(await does_account_exist(address, client)) + @test_async_and_sync(globals(), ["xrpl.account.does_account_exist"]) + async def test_does_account_exist_throws_for_invalid_account(self, client): + address = "a" + with self.assertRaises(XRPLRequestFailureException): + await does_account_exist(address, client) + @test_async_and_sync(globals(), ["xrpl.account.does_account_exist"]) async def test_does_account_exist_xaddress(self, client): xaddress = classic_address_to_xaddress(WALLET.classic_address, None, True)