diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-12-21 09:55:01 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-12-21 09:55:01 -0800 |
commit | 72d3b80eeb5c31fb487f56f38f283b6416301ad9 (patch) | |
tree | be7e8a8233e2420f761928c4a5a83ae8e6492570 /tests/hazmat/primitives/utils.py | |
parent | 9b9318d79ba5927603b120411d13b607938cae56 (diff) | |
parent | 687d0f849fd88eeaa6fe8968091a9d79b7f96901 (diff) | |
download | cryptography-72d3b80eeb5c31fb487f56f38f283b6416301ad9.tar.gz cryptography-72d3b80eeb5c31fb487f56f38f283b6416301ad9.tar.bz2 cryptography-72d3b80eeb5c31fb487f56f38f283b6416301ad9.zip |
Merge pull request #323 from reaperhulk/fix-tests-multi-backend
Don't modify params dict on parametrized tests
Diffstat (limited to 'tests/hazmat/primitives/utils.py')
-rw-r--r-- | tests/hazmat/primitives/utils.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/hazmat/primitives/utils.py b/tests/hazmat/primitives/utils.py index 758e755c..227a4055 100644 --- a/tests/hazmat/primitives/utils.py +++ b/tests/hazmat/primitives/utils.py @@ -44,8 +44,8 @@ def encrypt_test(backend, cipher_factory, mode_factory, params, only_if, skip_message): if not only_if(backend): pytest.skip(skip_message) - plaintext = params.pop("plaintext") - ciphertext = params.pop("ciphertext") + plaintext = params["plaintext"] + ciphertext = params["ciphertext"] cipher = Cipher( cipher_factory(**params), mode_factory(**params), @@ -84,9 +84,9 @@ def aead_test(backend, cipher_factory, mode_factory, params, only_if, if not only_if(backend): pytest.skip(skip_message) if params.get("pt") is not None: - plaintext = params.pop("pt") - ciphertext = params.pop("ct") - aad = params.pop("aad") + plaintext = params["pt"] + ciphertext = params["ct"] + aad = params["aad"] if params.get("fail") is True: cipher = Cipher( cipher_factory(binascii.unhexlify(params["key"])), @@ -145,9 +145,9 @@ def stream_encryption_test(backend, cipher_factory, params, only_if, skip_message): if not only_if(backend): pytest.skip(skip_message) - plaintext = params.pop("plaintext") - ciphertext = params.pop("ciphertext") - offset = params.pop("offset") + plaintext = params["plaintext"] + ciphertext = params["ciphertext"] + offset = params["offset"] cipher = Cipher(cipher_factory(**params), None, backend=backend) encryptor = cipher.encryptor() # throw away offset bytes |