summaryrefslogtreecommitdiffstats
path: root/jwcrypto/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'jwcrypto/tests.py')
-rw-r--r--jwcrypto/tests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/jwcrypto/tests.py b/jwcrypto/tests.py
index 888ad39..13dfeb7 100644
--- a/jwcrypto/tests.py
+++ b/jwcrypto/tests.py
@@ -642,3 +642,9 @@ class ConformanceTests(unittest.TestCase):
key = jwk.JWK(kty='oct', k='secret', unknown='mystery')
# pylint: disable=protected-access
self.assertEqual('mystery', key._unknown['unknown'])
+
+ def test_key_ops_values(self):
+ self.assertRaises(jwk.InvalidJWKValue, jwk.JWK,
+ kty='RSA', n=1, key_ops=['sign'], use='enc')
+ self.assertRaises(jwk.InvalidJWKValue, jwk.JWK,
+ kty='RSA', n=1, key_ops=['sign', 'sign'])