diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-12-26 21:08:45 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-12-26 21:08:45 -0600 |
commit | 783479c6189d788ac2f721b5b017073736c578cb (patch) | |
tree | 1154a9967a5ddc68818d7420ef431fa67018ae18 /tests/hazmat/primitives/test_block.py | |
parent | 60fc8da5aad59fd61b891c3538ce61d96e91cbcb (diff) | |
download | cryptography-783479c6189d788ac2f721b5b017073736c578cb.tar.gz cryptography-783479c6189d788ac2f721b5b017073736c578cb.tar.bz2 cryptography-783479c6189d788ac2f721b5b017073736c578cb.zip |
refactor all tests to use mark instead of generator skips
Diffstat (limited to 'tests/hazmat/primitives/test_block.py')
-rw-r--r-- | tests/hazmat/primitives/test_block.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/hazmat/primitives/test_block.py b/tests/hazmat/primitives/test_block.py index 22a7c02f..30cf1d60 100644 --- a/tests/hazmat/primitives/test_block.py +++ b/tests/hazmat/primitives/test_block.py @@ -136,21 +136,19 @@ class TestCipherContext(object): decryptor.finalize() +@pytest.mark.supported( + only_if=lambda backend: backend.cipher_supported( + algorithms.AES("\x00" * 16), modes.GCM("\x00" * 12) + ), + skip_message="Does not support AES GCM", +) @pytest.mark.cipher class TestAEADCipherContext(object): test_aead_exceptions = generate_aead_exception_test( algorithms.AES, modes.GCM, - only_if=lambda backend: backend.cipher_supported( - algorithms.AES("\x00" * 16), modes.GCM("\x00" * 12) - ), - skip_message="Does not support AES GCM", ) test_aead_tag_exceptions = generate_aead_tag_exception_test( algorithms.AES, modes.GCM, - only_if=lambda backend: backend.cipher_supported( - algorithms.AES("\x00" * 16), modes.GCM("\x00" * 12) - ), - skip_message="Does not support AES GCM", ) |