mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
[qa] Use python2/3 syntax
This commit is contained in:
@@ -209,7 +209,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
||||
matchingOuts = 0
|
||||
for i, out in enumerate(dec_tx['vout']):
|
||||
totalOut += out['value']
|
||||
if outputs.has_key(out['scriptPubKey']['addresses'][0]):
|
||||
if out['scriptPubKey']['addresses'][0] in outputs:
|
||||
matchingOuts+=1
|
||||
else:
|
||||
assert_equal(i, rawtxfund['changepos'])
|
||||
@@ -249,7 +249,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
||||
matchingOuts = 0
|
||||
for out in dec_tx['vout']:
|
||||
totalOut += out['value']
|
||||
if outputs.has_key(out['scriptPubKey']['addresses'][0]):
|
||||
if out['scriptPubKey']['addresses'][0] in outputs:
|
||||
matchingOuts+=1
|
||||
|
||||
assert_equal(matchingOuts, 1)
|
||||
@@ -291,7 +291,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
||||
matchingOuts = 0
|
||||
for out in dec_tx['vout']:
|
||||
totalOut += out['value']
|
||||
if outputs.has_key(out['scriptPubKey']['addresses'][0]):
|
||||
if out['scriptPubKey']['addresses'][0] in outputs:
|
||||
matchingOuts+=1
|
||||
|
||||
assert_equal(matchingOuts, 2)
|
||||
@@ -309,7 +309,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
||||
try:
|
||||
rawtxfund = self.nodes[2].fundrawtransaction(rawtx)
|
||||
raise AssertionError("Spent more than available")
|
||||
except JSONRPCException,e:
|
||||
except JSONRPCException as e:
|
||||
assert("Insufficient" in e.error['message'])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user