def test_all_fields(self): account_delete = AccountDelete( account=ACCOUNT, fee=FEE, sequence=WALLET.next_sequence_num, destination=DESTINATION.classic_address, destination_tag=DESTINATION_TAG, ) response = submit_transaction(account_delete, WALLET) self.assertEqual(response.status, ResponseStatus.SUCCESS)
async def test_all_fields(self, client): account_delete = AccountDelete( account=ACCOUNT, fee=FEE, sequence=WALLET.sequence, destination=DESTINATION.classic_address, destination_tag=DESTINATION_TAG, ) response = await submit_transaction_async(account_delete, WALLET, check_fee=False) self.assertEqual(response.status, ResponseStatus.SUCCESS) WALLET.sequence += 1
def test_high_fee_account_delete_unauthorized(self): # We expect an XRPLException to be raised with self.assertRaises(XRPLException): # GIVEN a new AccountDelete transaction account_delete = AccountDelete( account=ACCOUNT, # WITH fee higher than 5 XRP fee=FEE, sequence=WALLET.sequence, destination=DESTINATION, destination_tag=DESTINATION_TAG, ) submit_transaction(account_delete, WALLET)
def test_calculate_account_delete_fee(self): # GIVEN a new AccountDelete transaction account_delete = AccountDelete( account=ACCOUNT, sequence=WALLET.sequence, destination=DESTINATION, destination_tag=DESTINATION_TAG, ) # AFTER autofilling the transaction fee account_delete_signed = safe_sign_and_autofill_transaction( account_delete, WALLET, JSON_RPC_CLIENT) # THEN we expect the calculated fee to be 5000000 drops (5 XRP) expected_fee = "5000000" self.assertEqual(account_delete_signed.fee, expected_fee)