(self)
| 405 | |
| 406 | |
| 407 | def check_wrong_credentials(self): |
| 408 | self.log.info("Check that incorrect credentials return 401 Unauthorized") |
| 409 | conn = BitcoinHTTPConnection(self.node) |
| 410 | wrong_pair = f"{conn.url.username}:wrong_password" |
| 411 | conn.headers = {"Authorization": f"Basic {str_to_b64str(wrong_pair)}"} |
| 412 | response = conn.post('/', '{"method": "getbestblockhash"}') |
| 413 | assert_equal(response.status, http.client.UNAUTHORIZED) |
| 414 | assert response.getheader('WWW-Authenticate') is not None |
| 415 | |
| 416 | |
| 417 | def check_malformed_auth_headers(self): |
no test coverage detected