mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
[qa] Remove misleading "errorString syntax"
Github-Pull: #7801
Rebased-From: ffff866da8
This commit is contained in:
parent
f1f1b82033
commit
28ba22c202
@ -56,13 +56,13 @@ class RawTransactionsTest(BitcoinTestFramework):
|
||||
rawtx = self.nodes[2].createrawtransaction(inputs, outputs)
|
||||
rawtx = self.nodes[2].signrawtransaction(rawtx)
|
||||
|
||||
errorString = ""
|
||||
try:
|
||||
rawtx = self.nodes[2].sendrawtransaction(rawtx['hex'])
|
||||
except JSONRPCException as e:
|
||||
errorString = e.error['message']
|
||||
assert("Missing inputs" in e.error['message'])
|
||||
else:
|
||||
assert(False)
|
||||
|
||||
assert("Missing inputs" in errorString)
|
||||
|
||||
#########################
|
||||
# RAW TX MULTISIG TESTS #
|
||||
|
@ -246,22 +246,20 @@ class WalletTest (BitcoinTestFramework):
|
||||
txObj = self.nodes[0].gettransaction(txId)
|
||||
assert_equal(txObj['amount'], Decimal('-0.0001'))
|
||||
|
||||
#this should fail
|
||||
errorString = ""
|
||||
try:
|
||||
txId = self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), "1f-4")
|
||||
except JSONRPCException as e:
|
||||
errorString = e.error['message']
|
||||
assert("Invalid amount" in e.error['message'])
|
||||
else:
|
||||
raise AssertionError("Must not parse invalid amounts")
|
||||
|
||||
assert("Invalid amount" in errorString)
|
||||
|
||||
errorString = ""
|
||||
try:
|
||||
self.nodes[0].generate("2") #use a string to as block amount parameter must fail because it's not interpreted as amount
|
||||
self.nodes[0].generate("2")
|
||||
raise AssertionError("Must not accept strings as numeric")
|
||||
except JSONRPCException as e:
|
||||
errorString = e.error['message']
|
||||
assert("not an integer" in e.error['message'])
|
||||
|
||||
assert("not an integer" in errorString)
|
||||
|
||||
#check if wallet or blochchain maintenance changes the balance
|
||||
self.sync_all()
|
||||
|
Loading…
Reference in New Issue
Block a user