diff options
author | Alex Stapleton <alexs@prol.etari.at> | 2014-03-26 17:39:29 +0000 |
---|---|---|
committer | Alex Stapleton <alexs@prol.etari.at> | 2014-03-27 07:31:12 +0000 |
commit | 112963e296aadfdeaa4e2624c3b81b6b8c726a06 (patch) | |
tree | cd3c462d09860a8c01ad756acf60acb89b23fd1b /tests/hazmat | |
parent | 7a489dbd116edd4ca5a6104b74748f3a4f712d15 (diff) | |
download | cryptography-112963e296aadfdeaa4e2624c3b81b6b8c726a06.tar.gz cryptography-112963e296aadfdeaa4e2624c3b81b6b8c726a06.tar.bz2 cryptography-112963e296aadfdeaa4e2624c3b81b6b8c726a06.zip |
Address most of my own comments
Diffstat (limited to 'tests/hazmat')
-rw-r--r-- | tests/hazmat/primitives/twofactor/test_hotp.py | 6 | ||||
-rw-r--r-- | tests/hazmat/primitives/twofactor/test_totp.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/hazmat/primitives/twofactor/test_hotp.py b/tests/hazmat/primitives/twofactor/test_hotp.py index b2b2677c..803f96f3 100644 --- a/tests/hazmat/primitives/twofactor/test_hotp.py +++ b/tests/hazmat/primitives/twofactor/test_hotp.py @@ -17,13 +17,13 @@ import os import pytest -from cryptography.exceptions import InvalidToken, _Causes +from cryptography.exceptions import InvalidToken, _Reasons from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.hashes import MD5, SHA1 from cryptography.hazmat.primitives.twofactor.hotp import HOTP from ....utils import ( - load_nist_vectors, load_vectors_from_file, raises_unsupported + load_nist_vectors, load_vectors_from_file, raises_unsupported_algorithm ) vectors = load_vectors_from_file( @@ -105,5 +105,5 @@ def test_invalid_backend(): pretend_backend = object() - with raises_unsupported(_Causes.BACKEND_MISSING_INTERFACE): + with raises_unsupported_algorithm(_Reasons.BACKEND_MISSING_INTERFACE): HOTP(secret, 8, hashes.SHA1(), pretend_backend) diff --git a/tests/hazmat/primitives/twofactor/test_totp.py b/tests/hazmat/primitives/twofactor/test_totp.py index 208b0eea..518d3ce8 100644 --- a/tests/hazmat/primitives/twofactor/test_totp.py +++ b/tests/hazmat/primitives/twofactor/test_totp.py @@ -15,12 +15,12 @@ from __future__ import absolute_import, division, print_function import pytest -from cryptography.exceptions import InvalidToken, _Causes +from cryptography.exceptions import InvalidToken, _Reasons from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.twofactor.totp import TOTP from ....utils import ( - load_nist_vectors, load_vectors_from_file, raises_unsupported + load_nist_vectors, load_vectors_from_file, raises_unsupported_algorithm ) vectors = load_vectors_from_file( @@ -139,5 +139,5 @@ def test_invalid_backend(): pretend_backend = object() - with raises_unsupported(_Causes.BACKEND_MISSING_INTERFACE): + with raises_unsupported_algorithm(_Reasons.BACKEND_MISSING_INTERFACE): TOTP(secret, 8, hashes.SHA1(), 30, pretend_backend) |