aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-10-28 12:52:47 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-10-28 17:36:52 -0500
commit30eabddbade7647e0fb53500356e252eed245c6a (patch)
tree4b435acd66eb54a3d23c3f7edc509ef844d0a2f7
parent2824ab72d30e8423d17496e2c3baa47106505c8c (diff)
downloadcryptography-30eabddbade7647e0fb53500356e252eed245c6a.tar.gz
cryptography-30eabddbade7647e0fb53500356e252eed245c6a.tar.bz2
cryptography-30eabddbade7647e0fb53500356e252eed245c6a.zip
change type of exception raised, fix docs typo
-rw-r--r--cryptography/hazmat/primitives/hmac.py2
-rw-r--r--docs/hazmat/primitives/hmac.rst2
-rw-r--r--tests/hazmat/primitives/test_hmac.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/cryptography/hazmat/primitives/hmac.py b/cryptography/hazmat/primitives/hmac.py
index c417cd2e..4da0cc3f 100644
--- a/cryptography/hazmat/primitives/hmac.py
+++ b/cryptography/hazmat/primitives/hmac.py
@@ -26,7 +26,7 @@ class HMAC(object):
backend = _default_backend
if digestmod is None:
- raise ValueError("digestmod is a required argument")
+ raise TypeError("digestmod is a required argument")
self._backend = backend
self.digestmod = digestmod
diff --git a/docs/hazmat/primitives/hmac.rst b/docs/hazmat/primitives/hmac.rst
index 76b7e24c..14aaf19f 100644
--- a/docs/hazmat/primitives/hmac.rst
+++ b/docs/hazmat/primitives/hmac.rst
@@ -34,7 +34,7 @@ message.
.. method:: update(msg)
- :param bytes msg The bytes you wish to hash.
+ :param bytes msg: The bytes you wish to hash.
.. method:: copy()
diff --git a/tests/hazmat/primitives/test_hmac.py b/tests/hazmat/primitives/test_hmac.py
index 81d9ac86..42726a7c 100644
--- a/tests/hazmat/primitives/test_hmac.py
+++ b/tests/hazmat/primitives/test_hmac.py
@@ -42,7 +42,7 @@ class TestHMAC(object):
assert isinstance(h.hexdigest(), str)
def test_hmac_no_digestmod(self):
- with pytest.raises(ValueError):
+ with pytest.raises(TypeError):
hmac.HMAC(key=b"shortkey")