MCPcopy Create free account
hub / github.com/ElementsProject/elements / test_auth

Method test_auth

test/functional/rpc_users.py:76–87  ·  view source on GitHub ↗
(self, node, user, password)

Source from the content-addressed store, hash-verified

74 f.write("rpcpassword={}\n".format(self.rpcpassword))
75
76 def test_auth(self, node, user, password):
77 self.log.info('Correct...')
78 assert_equal(200, call_with_auth(node, user, password).status)
79
80 self.log.info('Wrong...')
81 assert_equal(401, call_with_auth(node, user, password + 'wrong').status)
82
83 self.log.info('Wrong...')
84 assert_equal(401, call_with_auth(node, user + 'wrong', password).status)
85
86 self.log.info('Wrong...')
87 assert_equal(401, call_with_auth(node, user + 'wrong', password + 'wrong').status)
88
89 def run_test(self):
90 self.log.info('Check correctness of the rpcauth config option')

Callers 1

run_testMethod · 0.95

Calls 3

assert_equalFunction · 0.90
call_with_authFunction · 0.85
infoMethod · 0.80

Tested by

no test coverage detected