diff options
author | MarcoFalke <falke.marco@gmail.com> | 2016-04-03 21:20:14 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2016-04-19 16:36:41 +0200 |
commit | 28ba22c20209c88a6a903729d3935e836ed0cf1a (patch) | |
tree | 6357e3db5c8dc9d06fb24bfacc07aecb0b6fa740 /qa | |
parent | f1f1b82033271e1f8aa3d84f8e4f8ccc987e6553 (diff) | |
download | bitcoin-28ba22c20209c88a6a903729d3935e836ed0cf1a.tar.xz |
[qa] Remove misleading "errorString syntax"
Github-Pull: #7801
Rebased-From: ffff866da83209dcaa463d8b9539d3f539f83a97
Diffstat (limited to 'qa')
-rwxr-xr-x | qa/rpc-tests/rawtransactions.py | 6 | ||||
-rwxr-xr-x | qa/rpc-tests/wallet.py | 14 |
2 files changed, 9 insertions, 11 deletions
diff --git a/qa/rpc-tests/rawtransactions.py b/qa/rpc-tests/rawtransactions.py index b76cc1f580..e38ef6c8b1 100755 --- a/qa/rpc-tests/rawtransactions.py +++ b/qa/rpc-tests/rawtransactions.py @@ -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 # diff --git a/qa/rpc-tests/wallet.py b/qa/rpc-tests/wallet.py index e9748208ce..3cf0261f13 100755 --- a/qa/rpc-tests/wallet.py +++ b/qa/rpc-tests/wallet.py @@ -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() |