Browse Source

Fix pyflakes warnings in RPC tests

pull/40/head^2
Jack Grigg 7 years ago
parent
commit
f897e075c2
No known key found for this signature in database GPG Key ID: 665DBCD284F7DAFF
  1. 5
      qa/rpc-tests/key_import_export.py
  2. 7
      qa/rpc-tests/wallet_shieldcoinbase.py

5
qa/rpc-tests/key_import_export.py

@ -3,10 +3,9 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from time import sleep
from decimal import Decimal
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal, assert_greater_than, sync_blocks, start_nodes, initialize_chain_clean, connect_nodes_bi
from test_framework.util import assert_equal, assert_greater_than, start_nodes, initialize_chain_clean, connect_nodes_bi
import logging
@ -32,7 +31,7 @@ class KeyImportExportTest (BitcoinTestFramework):
[alice, bob, charlie, miner] = self.nodes
def alice_to_bob(amount):
txid = alice.sendtoaddress(addr, Decimal(amount))
alice.sendtoaddress(addr, Decimal(amount))
self.sync_all()
miner.generate(1)
self.sync_all()

7
qa/rpc-tests/wallet_shieldcoinbase.py

@ -8,7 +8,6 @@ from test_framework.authproxy import JSONRPCException
from test_framework.util import assert_equal, initialize_chain_clean, \
start_node, connect_nodes_bi, sync_blocks
import sys
import time
from decimal import Decimal
@ -117,7 +116,7 @@ class WalletShieldCoinbaseTest (BitcoinTestFramework):
# Shield coinbase utxos from node 0 of value 40, standard fee of 0.00010000
result = self.nodes[0].z_shieldcoinbase(mytaddr, myzaddr)
mytxid = self.wait_and_assert_operationid_status(0, result['opid'])
self.wait_and_assert_operationid_status(0, result['opid'])
self.sync_all()
self.nodes[1].generate(1)
self.sync_all()
@ -131,7 +130,7 @@ class WalletShieldCoinbaseTest (BitcoinTestFramework):
# Shield coinbase utxos from any node 2 taddr, and set fee to 0
result = self.nodes[2].z_shieldcoinbase("*", myzaddr, 0)
mytxid = self.wait_and_assert_operationid_status(2, result['opid'])
self.wait_and_assert_operationid_status(2, result['opid'])
self.sync_all()
self.nodes[1].generate(1)
self.sync_all()
@ -181,7 +180,7 @@ class WalletShieldCoinbaseTest (BitcoinTestFramework):
result = self.nodes[2].z_shieldcoinbase(mytaddr, myzaddr, 0)
assert_equal(result["shieldingUTXOs"], Decimal('7'))
assert_equal(result["remainingUTXOs"], Decimal('13'))
mytxid = self.wait_and_assert_operationid_status(2, result['opid'])
self.wait_and_assert_operationid_status(2, result['opid'])
self.sync_all()
self.nodes[1].generate(1)
self.sync_all()

Loading…
Cancel
Save