Browse Source

[tests] fix nodehandling.py flake8 warnings

0.15
John Newbery 8 years ago
parent
commit
d6564a26f4
  1. 14
      test/functional/nodehandling.py

14
test/functional/nodehandling.py

@ -3,11 +3,17 @@
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test node handling.""" """Test node handling."""
import time
import urllib.parse
from test_framework.test_framework import BitcoinTestFramework from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import * from test_framework.util import (assert_equal,
assert_raises_jsonrpc,
import urllib.parse connect_nodes_bi,
p2p_port,
start_node,
stop_node,
)
class NodeHandlingTest(BitcoinTestFramework): class NodeHandlingTest(BitcoinTestFramework):
@ -42,7 +48,7 @@ class NodeHandlingTest (BitcoinTestFramework):
self.nodes[2].clearbanned() self.nodes[2].clearbanned()
assert_equal(len(self.nodes[2].listbanned()), 0) assert_equal(len(self.nodes[2].listbanned()), 0)
##test persisted banlist # test persisted banlist
self.nodes[2].setban("127.0.0.0/32", "add") self.nodes[2].setban("127.0.0.0/32", "add")
self.nodes[2].setban("127.0.0.0/24", "add") self.nodes[2].setban("127.0.0.0/24", "add")
self.nodes[2].setban("192.168.0.1", "add", 1) # ban for 1 seconds self.nodes[2].setban("192.168.0.1", "add", 1) # ban for 1 seconds

Loading…
Cancel
Save