aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/test_python.py
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-04-19 05:41:18 -0400
committerJack Lloyd <[email protected]>2019-04-19 05:41:18 -0400
commita2f727c425b81c2cfc88f1324cec961198cf0b76 (patch)
treefed44c5762938424f11815ea28276cb17a5ab909 /src/scripts/test_python.py
parent1906b0437e77c194543b3e549187c1989270ebd3 (diff)
Clean up some things in Python wrapper
Diffstat (limited to 'src/scripts/test_python.py')
-rw-r--r--src/scripts/test_python.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/scripts/test_python.py b/src/scripts/test_python.py
index dd434531e..b6e8ca9d6 100644
--- a/src/scripts/test_python.py
+++ b/src/scripts/test_python.py
@@ -102,6 +102,12 @@ class BotanPythonTests(unittest.TestCase):
user_rng.add_entropy('seed material...')
def test_hash(self):
+
+ try:
+ h = botan2.HashFunction('NoSuchHash')
+ except botan2.BotanException as e:
+ self.assertEqual(str(e), "botan_hash_init failed: -40 (Not implemented)")
+
h = botan2.HashFunction('SHA-256')
self.assertEqual(h.algo_name(), 'SHA-256')
assert h.output_length() == 32