From 7f68ccda2080c427f5e34b4ecc16cba9a030f2c6 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Mon, 7 Jul 2014 17:51:18 -0700 Subject: Restore these tests --- tests/hazmat/primitives/test_rsa.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/hazmat/primitives/test_rsa.py b/tests/hazmat/primitives/test_rsa.py index 94cc6d3f..8e850737 100644 --- a/tests/hazmat/primitives/test_rsa.py +++ b/tests/hazmat/primitives/test_rsa.py @@ -1313,6 +1313,17 @@ class TestPSS(object): assert pss._salt_length == padding.PSS.MAX_LENGTH +class TestMGF1(object): + def test_invalid_hash_algorithm(self): + with pytest.raises(TypeError): + padding.MGF1(b"not_a_hash") + + def test_valid_mgf1_parameters(self): + algorithm = hashes.SHA1() + mgf = padding.MGF1(algorithm) + assert mgf._algorithm == algorithm + + class TestOAEP(object): def test_invalid_algorithm(self): mgf = padding.MGF1(hashes.SHA1()) -- cgit v1.2.3