mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-02-02 18:24:25 +00:00
[tests] fix nodehandling.py flake8 warnings
This commit is contained in:
parent
23e6e64a24
commit
d6564a26f4
@ -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…
x
Reference in New Issue
Block a user