aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-02 17:48:01 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-02 21:28:53 -0500
commitc9a879350d46581d69d51732d18579defd78072f (patch)
treeefe0323956f716642532d7f12a89ddcf5d2e52cd /tests
parentba987453e648f6c40023c42524d11a4d568fcf99 (diff)
downloadcryptography-c9a879350d46581d69d51732d18579defd78072f.tar.gz
cryptography-c9a879350d46581d69d51732d18579defd78072f.tar.bz2
cryptography-c9a879350d46581d69d51732d18579defd78072f.zip
address review comments
Diffstat (limited to 'tests')
-rw-r--r--tests/hazmat/primitives/test_rsa.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/hazmat/primitives/test_rsa.py b/tests/hazmat/primitives/test_rsa.py
index c159ab8b..e15108a9 100644
--- a/tests/hazmat/primitives/test_rsa.py
+++ b/tests/hazmat/primitives/test_rsa.py
@@ -1128,7 +1128,7 @@ class TestPSS(object):
def test_deprecation_warning(self):
pytest.deprecated_call(
padding.PSS,
- **{"mgf": padding.MGF1(hashes.SHA1(), 20)}
+ padding.MGF1(hashes.SHA1(), 20)
)
def test_invalid_salt_length_not_integer(self):
@@ -1149,6 +1149,10 @@ class TestPSS(object):
salt_length=-1
)
+ def test_no_salt_length_supplied_pss_or_mgf1(self):
+ with pytest.raises(ValueError):
+ padding.PSS(mgf=padding.MGF1(hashes.SHA1()))
+
def test_valid_pss_parameters(self):
algorithm = hashes.SHA1()
salt_length = algorithm.digest_size
@@ -1168,8 +1172,7 @@ class TestPSS(object):
class TestMGF1(object):
def test_deprecation_warning(self):
pytest.deprecated_call(
- padding.MGF1,
- **{"algorithm": hashes.SHA1(), "salt_length": 20}
+ padding.MGF1, hashes.SHA1(), 20
)
def test_invalid_hash_algorithm(self):