mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-06-02 15:32:34 +02:00
test: Replace inline-comments with logs, pep8 formatting
This commit is contained in:
parent
fa83b39ff3
commit
fa12a37b27
@ -20,6 +20,7 @@ import string
|
||||
import configparser
|
||||
import sys
|
||||
|
||||
|
||||
def call_with_auth(node, user, password):
|
||||
url = urllib.parse.urlparse(node.url)
|
||||
headers = {"Authorization": "Basic " + str_to_b64str('{}:{}'.format(user, password))}
|
||||
@ -85,10 +86,7 @@ class HTTPBasicsTest(BitcoinTestFramework):
|
||||
assert_equal(401, call_with_auth(node, user + 'wrong', password + 'wrong').status)
|
||||
|
||||
def run_test(self):
|
||||
|
||||
##################################################
|
||||
# Check correctness of the rpcauth config option #
|
||||
##################################################
|
||||
self.log.info('Check correctness of the rpcauth config option')
|
||||
url = urllib.parse.urlparse(self.nodes[0].url)
|
||||
|
||||
self.test_auth(self.nodes[0], url.username, url.password)
|
||||
@ -96,9 +94,7 @@ class HTTPBasicsTest(BitcoinTestFramework):
|
||||
self.test_auth(self.nodes[0], 'rt2', self.rt2password)
|
||||
self.test_auth(self.nodes[0], self.user, self.password)
|
||||
|
||||
###############################################################
|
||||
# Check correctness of the rpcuser/rpcpassword config options #
|
||||
###############################################################
|
||||
self.log.info('Check correctness of the rpcuser/rpcpassword config options')
|
||||
url = urllib.parse.urlparse(self.nodes[1].url)
|
||||
|
||||
self.test_auth(self.nodes[1], self.rpcuser, self.rpcpassword)
|
||||
|
Loading…
Reference in New Issue
Block a user