(self)
| 1723 | self.assertRaises(ValueError, opener.open, "http://www.example.com") |
| 1724 | |
| 1725 | def test_unsupported_auth_basic_handler(self): |
| 1726 | # While using BasicAuthHandler |
| 1727 | opener = OpenerDirector() |
| 1728 | basic_auth_handler = urllib.request.HTTPBasicAuthHandler(None) |
| 1729 | http_handler = MockHTTPHandlerRedirect( |
| 1730 | 401, 'WWW-Authenticate: NTLM\r\n\r\n') |
| 1731 | opener.add_handler(basic_auth_handler) |
| 1732 | opener.add_handler(http_handler) |
| 1733 | self.assertRaises(ValueError, opener.open, "http://www.example.com") |
| 1734 | |
| 1735 | def _test_basic_auth(self, opener, auth_handler, auth_header, |
| 1736 | realm, http_handler, password_manager, |
nothing calls this directly
no test coverage detected