aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_block.py
diff options
context:
space:
mode:
authorAlex Stapleton <alexs@prol.etari.at>2015-02-16 15:59:50 +0000
committerAlex Stapleton <alexs@prol.etari.at>2015-02-16 15:59:50 +0000
commit99c1b803aeb2260d8dbc131aca608276a714285c (patch)
tree979666c5fb3b4aca15549bb0bff09487956cacc7 /tests/hazmat/primitives/test_block.py
parentebc1717d73eaccffeddc32cee9eb0ad5936f7a4b (diff)
parent7c5c9fedd513f4ef66b62fcf5fdcde8dc30fe532 (diff)
downloadcryptography-99c1b803aeb2260d8dbc131aca608276a714285c.tar.gz
cryptography-99c1b803aeb2260d8dbc131aca608276a714285c.tar.bz2
cryptography-99c1b803aeb2260d8dbc131aca608276a714285c.zip
Merge pull request #1659 from reaperhulk/move-cipher-interfaces
Move cipher and mode interfaces
Diffstat (limited to 'tests/hazmat/primitives/test_block.py')
-rw-r--r--tests/hazmat/primitives/test_block.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/hazmat/primitives/test_block.py b/tests/hazmat/primitives/test_block.py
index 22e6d0e9..1b3fc1cb 100644
--- a/tests/hazmat/primitives/test_block.py
+++ b/tests/hazmat/primitives/test_block.py
@@ -13,9 +13,8 @@ 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
+ Cipher, algorithms, base, modes
)
from .utils import (
@@ -24,7 +23,7 @@ from .utils import (
from ...utils import raises_unsupported_algorithm
-@utils.register_interface(interfaces.Mode)
+@utils.register_interface(modes.Mode)
class DummyMode(object):
name = "dummy-mode"
@@ -32,7 +31,7 @@ class DummyMode(object):
pass
-@utils.register_interface(interfaces.CipherAlgorithm)
+@utils.register_interface(base.CipherAlgorithm)
class DummyCipher(object):
name = "dummy-cipher"
key_size = None
@@ -46,7 +45,7 @@ class TestCipher(object):
modes.CBC(binascii.unhexlify(b"0" * 32)),
backend
)
- assert isinstance(cipher.encryptor(), interfaces.CipherContext)
+ assert isinstance(cipher.encryptor(), base.CipherContext)
def test_creates_decryptor(self, backend):
cipher = Cipher(
@@ -54,7 +53,7 @@ class TestCipher(object):
modes.CBC(binascii.unhexlify(b"0" * 32)),
backend
)
- assert isinstance(cipher.decryptor(), interfaces.CipherContext)
+ assert isinstance(cipher.decryptor(), base.CipherContext)
def test_instantiate_with_non_algorithm(self, backend):
algorithm = object()