aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_cmac.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hazmat/primitives/test_cmac.py')
-rw-r--r--tests/hazmat/primitives/test_cmac.py15
1 files changed, 1 insertions, 14 deletions
diff --git a/tests/hazmat/primitives/test_cmac.py b/tests/hazmat/primitives/test_cmac.py
index 08b6bf5d..2ca05d6d 100644
--- a/tests/hazmat/primitives/test_cmac.py
+++ b/tests/hazmat/primitives/test_cmac.py
@@ -6,8 +6,6 @@ from __future__ import absolute_import, division, print_function
import binascii
-import pretend
-
import pytest
from cryptography.exceptions import (
@@ -19,11 +17,11 @@ from cryptography.hazmat.primitives.ciphers.algorithms import (
)
from cryptography.hazmat.primitives.cmac import CMAC
-from ..backends.test_multibackend import DummyCMACBackend
from ...utils import (
load_nist_vectors, load_vectors_from_file, raises_unsupported_algorithm
)
+
vectors_aes128 = load_vectors_from_file(
"CMAC/nist-800-38b-aes128.txt", load_nist_vectors)
@@ -186,17 +184,6 @@ class TestCMAC(object):
assert cmac.finalize() == copy_cmac.finalize()
-def test_copy():
- backend = DummyCMACBackend([AES])
- copied_ctx = pretend.stub()
- pretend_ctx = pretend.stub(copy=lambda: copied_ctx)
- key = b"2b7e151628aed2a6abf7158809cf4f3c"
- cmac = CMAC(AES(key), backend=backend, ctx=pretend_ctx)
-
- assert cmac._backend is backend
- assert cmac.copy()._backend is backend
-
-
def test_invalid_backend():
key = b"2b7e151628aed2a6abf7158809cf4f3c"
pretend_backend = object()