(self)
| 396 | |
| 397 | |
| 398 | def check_auth_required(self): |
| 399 | self.log.info("Check that requests without credentials return 401 Unauthorized with WWW-Authenticate") |
| 400 | conn = BitcoinHTTPConnection(self.node) |
| 401 | conn.headers = {} |
| 402 | response = conn.post('/', '{"method": "getbestblockhash"}') |
| 403 | assert_equal(response.status, http.client.UNAUTHORIZED) |
| 404 | assert response.getheader('WWW-Authenticate') is not None |
| 405 | |
| 406 | |
| 407 | def check_wrong_credentials(self): |
no test coverage detected