def METHOD_NAME(self):
    ##################################################
    # Check correctness of the rpcauth config option #
    ##################################################
    url = urllib.parse.urlparse(self.nodes[0].url)
    #Old authpair
    authpair = url.username + ':' + url.password
    #New authpair generated via share/rpcauth tool
    password = "cA773lm788buwYe4g4WT+05pKyNruVKjQ25x3n0DQcM="
    #Second authpair with different username
    password2 = "8/F3uMDw4KSEbw96U3CA1C4X05dkHDN2BPFjTgZW4KI="
    authpairnew = "rt:"+password
    self.log.info('Correct...')
    headers = {"Authorization": "Basic " + str_to_b64str(authpair)}
    conn = http.client.HTTPConnection(url.hostname, url.port)
    conn.connect()
    conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
    resp = conn.getresponse()
    assert_equal(resp.status, 200)
    conn.close()
    #Use new authpair to confirm both work
    self.log.info('Correct...')
    headers = {"Authorization": "Basic " + str_to_b64str(authpairnew)}
    conn = http.client.HTTPConnection(url.hostname, url.port)
    conn.connect()
    conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
    resp = conn.getresponse()
    assert_equal(resp.status, 200)
    conn.close()
    #Wrong login name with rt's password
    self.log.info('Wrong...')
    authpairnew = "rtwrong:"+password
    headers = {"Authorization": "Basic " + str_to_b64str(authpairnew)}
    conn = http.client.HTTPConnection(url.hostname, url.port)
    conn.connect()
    conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
    resp = conn.getresponse()
    assert_equal(resp.status, 401)
    conn.close()
    #Wrong password for rt
    self.log.info('Wrong...')
    authpairnew = "rt:"+password+"wrong"
    headers = {"Authorization": "Basic " + str_to_b64str(authpairnew)}
    conn = http.client.HTTPConnection(url.hostname, url.port)
    conn.connect()
    conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
    resp = conn.getresponse()
    assert_equal(resp.status, 401)
    conn.close()
    #Correct for rt2
    self.log.info('Correct...')
    authpairnew = "rt2:"+password2
    headers = {"Authorization": "Basic " + str_to_b64str(authpairnew)}
    conn = http.client.HTTPConnection(url.hostname, url.port)
    conn.connect()
    conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
    resp = conn.getresponse()
    assert_equal(resp.status, 200)
    conn.close()
    #Wrong password for rt2
    self.log.info('Wrong...')
    authpairnew = "rt2:"+password2+"wrong"
    headers = {"Authorization": "Basic " + str_to_b64str(authpairnew)}
    conn = http.client.HTTPConnection(url.hostname, url.port)
    conn.connect()
    conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
    resp = conn.getresponse()
    assert_equal(resp.status, 401)
    conn.close()
    #Correct for randomly generated user
    self.log.info('Correct...')
    authpairnew = self.user+":"+self.password
    headers = {"Authorization": "Basic " + str_to_b64str(authpairnew)}
    conn = http.client.HTTPConnection(url.hostname, url.port)
    conn.connect()
    conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
    resp = conn.getresponse()
    assert_equal(resp.status, 200)
    conn.close()
    #Wrong password for randomly generated user
    self.log.info('Wrong...')
    authpairnew = self.user+":"+self.password+"Wrong"
    headers = {"Authorization": "Basic " + str_to_b64str(authpairnew)}
    conn = http.client.HTTPConnection(url.hostname, url.port)
    conn.connect()
    conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
    resp = conn.getresponse()
    assert_equal(resp.status, 401)
    conn.close()
    ###############################################################
    # Check correctness of the rpcuser/rpcpassword config options #
    ###############################################################
    url = urllib.parse.urlparse(self.nodes[1].url)
    # rpcuser and rpcpassword authpair
    self.log.info('Correct...')
    rpcuserauthpair = "rpcuser💻:rpcpassword🔑"
    headers = {"Authorization": "Basic " + str_to_b64str(rpcuserauthpair)}
    conn = http.client.HTTPConnection(url.hostname, url.port)
    conn.connect()
    conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
    resp = conn.getresponse()
    assert_equal(resp.status, 200)
    conn.close()
    #Wrong login name with rpcuser's password
    rpcuserauthpair = "rpcuserwrong:rpcpassword"
    headers = {"Authorization": "Basic " + str_to_b64str(rpcuserauthpair)}
    conn = http.client.HTTPConnection(url.hostname, url.port)
    conn.connect()
    conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
    resp = conn.getresponse()
    assert_equal(resp.status, 401)
    conn.close()
    #Wrong password for rpcuser
    self.log.info('Wrong...')
    rpcuserauthpair = "rpcuser:rpcpasswordwrong"
    headers = {"Authorization": "Basic " + str_to_b64str(rpcuserauthpair)}
    conn = http.client.HTTPConnection(url.hostname, url.port)
    conn.connect()
    conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
    resp = conn.getresponse()
    assert_equal(resp.status, 401)
    conn.close()