aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/backends
diff options
context:
space:
mode:
authorAlex Stapleton <alexs@prol.etari.at>2014-07-12 12:27:37 +0100
committerAlex Stapleton <alexs@prol.etari.at>2014-07-12 12:27:37 +0100
commitfaf305b3143d35d60d860c4156d020494280008b (patch)
treed5100c200dd95fa9a4190649f99878b6642d06a1 /docs/hazmat/backends
parent3e5ea581f240bc9ec19a50f87b326873550feb21 (diff)
downloadcryptography-faf305b3143d35d60d860c4156d020494280008b.tar.gz
cryptography-faf305b3143d35d60d860c4156d020494280008b.tar.bz2
cryptography-faf305b3143d35d60d860c4156d020494280008b.zip
Get rid of remaining pycon blocks
Diffstat (limited to 'docs/hazmat/backends')
-rw-r--r--docs/hazmat/backends/multibackend.rst19
1 files changed, 18 insertions, 1 deletions
diff --git a/docs/hazmat/backends/multibackend.rst b/docs/hazmat/backends/multibackend.rst
index 119b13ae..0aae04a7 100644
--- a/docs/hazmat/backends/multibackend.rst
+++ b/docs/hazmat/backends/multibackend.rst
@@ -12,7 +12,24 @@ MultiBackend
This class allows you to combine multiple backends into a single backend
that offers the combined features of all of its constituents.
- .. code-block:: pycon
+ .. testsetup::
+
+ from cryptography import utils
+ from cryptography.exceptions import UnsupportedAlgorithm, _Reasons
+ from cryptography.hazmat.backends.interfaces import HashBackend
+ from cryptography.hazmat.backends.openssl.backend import backend as backend2
+
+ @utils.register_interface(HashBackend)
+ class DummyHashBackend(object):
+ def hash_supported(self, algorithm):
+ return False
+
+ def create_hash_ctx(self, algorithm):
+ raise UnsupportedAlgorithm("", _Reasons.UNSUPPORTED_HASH)
+
+ backend1 = DummyHashBackend()
+
+ .. doctest::
>>> from cryptography.hazmat.backends.multibackend import MultiBackend
>>> from cryptography.hazmat.primitives import hashes