Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update error text for utxostoaccount test #1816

Merged
merged 2 commits into from
Mar 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions test/functional/feature_accounts_n_utxos.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from test_framework.test_framework import DefiTestFramework

from test_framework.authproxy import JSONRPCException
from test_framework.util import assert_equal, \
from test_framework.util import assert_equal, assert_raises_rpc_error, \
connect_nodes_bi

class AccountsAndUTXOsTest (DefiTestFramework):
Expand Down Expand Up @@ -112,20 +112,10 @@ def run_test(self):
assert_equal(self.nodes[0].getaccount(accountSilver, {}, True)[idSilver], self.nodes[1].getaccount(accountSilver, {}, True)[idSilver])
assert_equal(self.nodes[0].getaccount(toSilver, {}, True)[idSilver], self.nodes[1].getaccount(toSilver, {}, True)[idSilver])

# missing (account exists, there are tokens, but not token 0) - autofunded now!
# try:
# self.nodes[0].accounttoaccount(toSilver, {accountGold: "100@" + symbolSILVER}, [])
# except JSONRPCException as e:
# errorString = e.error['message']
# assert("Can't find any UTXO" in errorString)

# utxostoaccount
# Only technically supported for DFI as accounttoutxxos blocks non-DFI transfers
#========================
try:
self.nodes[0].utxostoaccount({toGold: "100@" + symbolGOLD}, [])
except JSONRPCException as e:
errorString = e.error['message']
assert("Insufficient funds" in errorString)
assert_raises_rpc_error(-4, "Unexpected token type set for recipient. Only native DFI token type expected.", self.nodes[0].utxostoaccount, {toGold: "100@" + symbolGOLD})

# missing amount
try:
Expand Down Expand Up @@ -189,7 +179,6 @@ def run_test(self):
self.nodes[0].accounttoutxos(accountGold, {accountGold: "100@" + symbolGOLD}, [])
self.nodes[0].generate(1)
except JSONRPCException as e:
print(e)
errorString = e.error['message']
assert("only available for DFI transactions" in errorString)

Expand Down