def test_supported_content_hash_algorithm_success_in_get_content_hash( self): for alg in JOSE_SUPPORTED_CONTENT_HASH_ALGS: transport = JOSETransport() to_hash = str(uuid4()) result = transport._get_content_hash(to_hash, alg) self.assertNotEqual(to_hash, result)
def test_unsupported_content_hash_algorithm_success_in_get_content_hash_raises_invalid_algorithm_error( self): transport = JOSETransport() with self.assertRaises(InvalidAlgorithm): transport._get_content_hash(None, "invalid")
def test_unsupported_content_hash_algorithm_success_in_get_content_hash_raises_invalid_algorithm_error(self): transport = JOSETransport() with self.assertRaises(InvalidAlgorithm): transport._get_content_hash(None, "invalid")
def test_supported_content_hash_algorithm_success_in_get_content_hash(self): for alg in JOSE_SUPPORTED_CONTENT_HASH_ALGS: transport = JOSETransport() to_hash = str(uuid4()) result = transport._get_content_hash(to_hash, alg) self.assertNotEqual(to_hash, result)