def test_hash_file_throws_for_invalid_or_unsupported_hash(self):
    data = b'Mary had a little lamb, its fleece as white as snow'
    file_like_object = six.BytesIO(data)
    self.assertRaises(exception.InvalidParameterValue, utils.hash_file, file_like_object, 'hickory-dickory-dock')
def test_hash_file_throws_for_invalid_or_unsupported_hash(self):
    data = b'Mary had a little lamb, its fleece as white as snow'
    file_like_object = six.BytesIO(data)
    self.assertRaises(exception.InvalidParameterValue, utils.hash_file, file_like_object, 'hickory-dickory-dock')