aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_utils.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-11-19 07:38:19 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2013-11-19 07:38:19 -0800
commitb29a6b2e4623fa87fecaccc05551b996f684cd53 (patch)
treef3579a5536862a304eaba25612f07f0c2515c8bd /tests/hazmat/primitives/test_utils.py
parent867acfa0300ca75f2c11c15490e04b556d8bfe99 (diff)
parent62e96cbb0698d8f7d65d8dd2d301ef975a829d9e (diff)
downloadcryptography-b29a6b2e4623fa87fecaccc05551b996f684cd53.tar.gz
cryptography-b29a6b2e4623fa87fecaccc05551b996f684cd53.tar.bz2
cryptography-b29a6b2e4623fa87fecaccc05551b996f684cd53.zip
Merge branch 'master' into fernet
Diffstat (limited to 'tests/hazmat/primitives/test_utils.py')
-rw-r--r--tests/hazmat/primitives/test_utils.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/hazmat/primitives/test_utils.py b/tests/hazmat/primitives/test_utils.py
index d7247e67..cee0b20e 100644
--- a/tests/hazmat/primitives/test_utils.py
+++ b/tests/hazmat/primitives/test_utils.py
@@ -2,7 +2,7 @@ import pytest
from .utils import (
base_hash_test, encrypt_test, hash_test, long_string_hash_test,
- base_hmac_test, hmac_test
+ base_hmac_test, hmac_test, stream_encryption_test
)
@@ -70,3 +70,14 @@ class TestBaseHMACTest(object):
skip_message="message!"
)
assert exc_info.value.args[0] == "message!"
+
+
+class TestStreamEncryptionTest(object):
+ def test_skips_if_only_if_returns_false(self):
+ with pytest.raises(pytest.skip.Exception) as exc_info:
+ stream_encryption_test(
+ None, None, None,
+ only_if=lambda backend: False,
+ skip_message="message!"
+ )
+ assert exc_info.value.args[0] == "message!"