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

Method test_invalid_algorithm

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

Source from the content-addressed store, hash-verified

2014 self.assertEqual(KD("foo", "bar"), "a765a8beaa9d561d4c5cbed29d8f4e30870297fdfa9cb7d6e9848a95fec9f937")
2015
2016 def test_invalid_algorithm(self):
2017 with self.assertRaises(ValueError) as exc:
2018 self.handler.get_algorithm_impls('invalid')
2019 self.assertEqual(
2020 str(exc.exception),
2021 "Unsupported digest authentication algorithm 'invalid'"
2022 )
2023
2024
2025class RequestTests(unittest.TestCase):

Callers

nothing calls this directly

Calls 4

strFunction · 0.85
get_algorithm_implsMethod · 0.80
assertRaisesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected