diff options
| author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-11-07 07:50:17 +0800 | 
|---|---|---|
| committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-11-07 08:02:08 +0800 | 
| commit | 4da28c35d93e14a5e6b0a252751e7cfbaf0fe372 (patch) | |
| tree | 854c50830dcd7083c31e8e91b16ba4f1813d6ca1 /tests/hazmat/primitives/test_utils.py | |
| parent | 60d4c68845aff3d44902cb978231fa01a5e74359 (diff) | |
| download | cryptography-4da28c35d93e14a5e6b0a252751e7cfbaf0fe372.tar.gz cryptography-4da28c35d93e14a5e6b0a252751e7cfbaf0fe372.tar.bz2 cryptography-4da28c35d93e14a5e6b0a252751e7cfbaf0fe372.zip  | |
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!"  | 
