diff options
author | David Reid <dreid@dreid.org> | 2013-11-09 15:53:33 -0800 |
---|---|---|
committer | David Reid <dreid@dreid.org> | 2013-11-09 15:53:33 -0800 |
commit | 1aefe584a2c5c4f6bbf2839184868b16bdb9dc0b (patch) | |
tree | 2dd352daf4326db4856819b85487ca751b811632 /tests/hazmat/primitives/test_utils.py | |
parent | df52fa9d388c2fc7d721c0fba5ca21ec88a01a15 (diff) | |
parent | 0994c5628a3d960a45f8aac33f0d5d985eb48cf7 (diff) | |
download | cryptography-1aefe584a2c5c4f6bbf2839184868b16bdb9dc0b.tar.gz cryptography-1aefe584a2c5c4f6bbf2839184868b16bdb9dc0b.tar.bz2 cryptography-1aefe584a2c5c4f6bbf2839184868b16bdb9dc0b.zip |
Merge pull request #214 from reaperhulk/arc4-support
ARC4 Support
Diffstat (limited to 'tests/hazmat/primitives/test_utils.py')
-rw-r--r-- | tests/hazmat/primitives/test_utils.py | 13 |
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!" |