MCPcopy Index your code
hub / github.com/python/cpython / test_unsupported_auth_digest_handler

Method test_unsupported_auth_digest_handler

Lib/test/test_urllib2.py:1715–1723  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1713 self.assertEqual(opener.recorded, ["digest", "basic"]*2)
1714
1715 def test_unsupported_auth_digest_handler(self):
1716 opener = OpenerDirector()
1717 # While using DigestAuthHandler
1718 digest_auth_handler = urllib.request.HTTPDigestAuthHandler(None)
1719 http_handler = MockHTTPHandlerRedirect(
1720 401, 'WWW-Authenticate: Kerberos\r\n\r\n')
1721 opener.add_handler(digest_auth_handler)
1722 opener.add_handler(http_handler)
1723 self.assertRaises(ValueError, opener.open, "http://www.example.com")
1724
1725 def test_unsupported_auth_basic_handler(self):
1726 # While using BasicAuthHandler

Callers

nothing calls this directly

Calls 4

add_handlerMethod · 0.95
OpenerDirectorClass · 0.90
assertRaisesMethod · 0.45

Tested by

no test coverage detected