[tests] fix nodehandling.py flake8 warnings

Github-Pull: #10143
Rebased-From: d6564a26f4
This commit is contained in:
John Newbery
2017-04-19 11:07:44 -04:00
committed by Luke Dashjr
parent c25d0a8739
commit 5bc75bb8ee

View File

@@ -6,11 +6,17 @@
# #
# 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):
@@ -45,7 +51,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