diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-10-24 07:33:26 -0700 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-10-24 07:33:26 -0700 |
commit | 2f2346344ae5561bc9b106cbb452efeebe3cdc45 (patch) | |
tree | 4babc963e16a02d376075d545150c707e1ab37ff /tests/hazmat/primitives/test_block.py | |
parent | f281daed0e92dd3d00f9aa2fda6ae41e80a0e1fc (diff) | |
parent | 2607ab5b932395de6554f1f4a779481cd4b87619 (diff) | |
download | cryptography-2f2346344ae5561bc9b106cbb452efeebe3cdc45.tar.gz cryptography-2f2346344ae5561bc9b106cbb452efeebe3cdc45.tar.bz2 cryptography-2f2346344ae5561bc9b106cbb452efeebe3cdc45.zip |
Merge pull request #1434 from alex/requires-backend-interface
Change how we represented that a test requires a backend.
Diffstat (limited to 'tests/hazmat/primitives/test_block.py')
-rw-r--r-- | tests/hazmat/primitives/test_block.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/hazmat/primitives/test_block.py b/tests/hazmat/primitives/test_block.py index 022e3af7..6ee230a7 100644 --- a/tests/hazmat/primitives/test_block.py +++ b/tests/hazmat/primitives/test_block.py @@ -21,6 +21,7 @@ from cryptography import utils from cryptography.exceptions import ( AlreadyFinalized, _Reasons ) +from cryptography.hazmat.backends.interfaces import CipherBackend from cryptography.hazmat.primitives import interfaces from cryptography.hazmat.primitives.ciphers import ( Cipher, algorithms, modes @@ -45,7 +46,7 @@ class DummyCipher(object): name = "dummy-cipher" -@pytest.mark.cipher +@pytest.mark.requires_backend_interface(interface=CipherBackend) class TestCipher(object): def test_creates_encryptor(self, backend): cipher = Cipher( @@ -69,7 +70,7 @@ class TestCipher(object): Cipher(algorithm, mode=None, backend=backend) -@pytest.mark.cipher +@pytest.mark.requires_backend_interface(interface=CipherBackend) class TestCipherContext(object): def test_use_after_finalize(self, backend): cipher = Cipher( @@ -146,7 +147,7 @@ class TestCipherContext(object): ), skip_message="Does not support AES GCM", ) -@pytest.mark.cipher +@pytest.mark.requires_backend_interface(interface=CipherBackend) class TestAEADCipherContext(object): test_aead_exceptions = generate_aead_exception_test( algorithms.AES, @@ -158,7 +159,7 @@ class TestAEADCipherContext(object): ) -@pytest.mark.cipher +@pytest.mark.requires_backend_interface(interface=CipherBackend) class TestModeValidation(object): def test_cbc(self, backend): with pytest.raises(ValueError): |