From 77ae0cdf4a04efcd61c936ad85e40f9a26768b23 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 5 Mar 2016 14:07:34 -0500 Subject: turns out you have to _commit_ the file you wrote. who knew! --- tests/doubles.py | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tests/doubles.py (limited to 'tests/doubles.py') diff --git a/tests/doubles.py b/tests/doubles.py new file mode 100644 index 00000000..9dbb3ce0 --- /dev/null +++ b/tests/doubles.py @@ -0,0 +1,41 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. + +from cryptography import utils +from cryptography.hazmat.primitives import hashes, serialization +from cryptography.hazmat.primitives.asymmetric import padding +from cryptography.hazmat.primitives.ciphers import CipherAlgorithm +from cryptography.hazmat.primitives.ciphers.modes import Mode + + +@utils.register_interface(CipherAlgorithm) +class DummyCipherAlgorithm(object): + name = "dummy-cipher" + block_size = 128 + key_size = None + + +@utils.register_interface(Mode) +class DummyMode(object): + name = "dummy-mode" + + def validate_for_algorithm(self, algorithm): + pass + + +@utils.register_interface(hashes.HashAlgorithm) +class DummyHashAlgorithm(object): + name = "dummy-hash" + block_size = None + digest_size = None + + +@utils.register_interface(serialization.KeySerializationEncryption) +class DummyKeySerializationEncryption(object): + pass + + +@utils.register_interface(padding.AsymmetricPadding) +class DummyAsymmetricPadding(object): + name = "dummy-padding" -- cgit v1.2.3 From 53e7b24e1ff91de415d2f128b1463bea33b756a9 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sun, 6 Mar 2016 09:54:23 -0500 Subject: standard future import --- tests/doubles.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/doubles.py') diff --git a/tests/doubles.py b/tests/doubles.py index 9dbb3ce0..2ff1942f 100644 --- a/tests/doubles.py +++ b/tests/doubles.py @@ -2,6 +2,8 @@ # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. +from __future__ import absolute_import, division, print_function + from cryptography import utils from cryptography.hazmat.primitives import hashes, serialization from cryptography.hazmat.primitives.asymmetric import padding -- cgit v1.2.3