diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-27 08:48:53 -0600 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-27 08:48:53 -0600 |
commit | bb30eb160045181b0c91fc9f2d8f374d65c2c13b (patch) | |
tree | 46009a3261034571d1549f36f5c5d196cbd2f7a7 /tests/hazmat/primitives/test_hashes.py | |
parent | 3c25f61c18c6f8f9a2210fb2124654023bcec775 (diff) | |
parent | e60e1d782cb7c1abe68811092f7db342ed14b81f (diff) | |
download | cryptography-bb30eb160045181b0c91fc9f2d8f374d65c2c13b.tar.gz cryptography-bb30eb160045181b0c91fc9f2d8f374d65c2c13b.tar.bz2 cryptography-bb30eb160045181b0c91fc9f2d8f374d65c2c13b.zip |
Merge branch 'master' into validate-iv
Conflicts:
tests/hazmat/primitives/test_block.py
Diffstat (limited to 'tests/hazmat/primitives/test_hashes.py')
-rw-r--r-- | tests/hazmat/primitives/test_hashes.py | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/tests/hazmat/primitives/test_hashes.py b/tests/hazmat/primitives/test_hashes.py index 367e764f..ff42e8f4 100644 --- a/tests/hazmat/primitives/test_hashes.py +++ b/tests/hazmat/primitives/test_hashes.py @@ -20,7 +20,6 @@ import pytest import six from cryptography.exceptions import AlreadyFinalized -from cryptography.hazmat.bindings import _default_backend from cryptography.hazmat.primitives import hashes from .utils import generate_base_hash_test @@ -41,19 +40,12 @@ class TestHashContext(object): assert h._backend is pretend_backend assert h.copy()._backend is h._backend - def test_default_backend_creation(self): - """ - This test assumes the presence of SHA1 in the default backend. - """ - h = hashes.Hash(hashes.SHA1()) - assert h._backend is _default_backend - - def test_hash_algorithm_instance(self): + def test_hash_algorithm_instance(self, backend): with pytest.raises(TypeError): - hashes.Hash(hashes.SHA1) + hashes.Hash(hashes.SHA1, backend=backend) - def test_raises_after_finalize(self): - h = hashes.Hash(hashes.SHA1()) + def test_raises_after_finalize(self, backend): + h = hashes.Hash(hashes.SHA1(), backend=backend) h.finalize() with pytest.raises(AlreadyFinalized): |