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

Method test_sha256_algorithm

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

Source from the content-addressed store, hash-verified

2009
2010 @skip_libssl_fips_mode
2011 def test_sha256_algorithm(self):
2012 H, KD = self.handler.get_algorithm_impls('SHA-256')
2013 self.assertEqual(H("foo"), "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae")
2014 self.assertEqual(KD("foo", "bar"), "a765a8beaa9d561d4c5cbed29d8f4e30870297fdfa9cb7d6e9848a95fec9f937")
2015
2016 def test_invalid_algorithm(self):
2017 with self.assertRaises(ValueError) as exc:

Callers

nothing calls this directly

Calls 3

get_algorithm_implsMethod · 0.80
HClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected