aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bindings/test_openssl.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-10-03 21:54:05 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-10-06 17:31:31 -0500
commitf2ce1ae856e43a292ea7a6aae26d75b508f0a363 (patch)
treed973c676ff4e4c7925abd9bb1a3b2fbac11bc62a /tests/bindings/test_openssl.py
parentefe0189de0714bbde76082566d0f82df1439cb63 (diff)
downloadcryptography-f2ce1ae856e43a292ea7a6aae26d75b508f0a363.tar.gz
cryptography-f2ce1ae856e43a292ea7a6aae26d75b508f0a363.tar.bz2
cryptography-f2ce1ae856e43a292ea7a6aae26d75b508f0a363.zip
rebase and modify to support some changed behaviors
* Update code to reflect new api object (ffi and lib are no longer private) * tests updated to take an api object * skipif marks removed for now as we need to use the api passed to each individual test. skip testing done inside the test * changed name of supports in api to supports_cipher (future PRs will contain supports_hash)
Diffstat (limited to 'tests/bindings/test_openssl.py')
-rw-r--r--tests/bindings/test_openssl.py19
1 files changed, 2 insertions, 17 deletions
diff --git a/tests/bindings/test_openssl.py b/tests/bindings/test_openssl.py
index 85ecc49c..e5b78d18 100644
--- a/tests/bindings/test_openssl.py
+++ b/tests/bindings/test_openssl.py
@@ -11,8 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import pytest
-
from cryptography.bindings.openssl.api import api
@@ -31,18 +29,5 @@ class TestOpenSSL(object):
"""
assert api.openssl_version_text().startswith("OpenSSL")
- def test_supports(self):
- assert api.supports("not-a-real-cipher") is False
-
- def test_create_block_cipher_context_with_unsupported_cipher(self):
- class FakeCipher(object):
- name = "FakeCipher"
- key_size = 24
-
- class FakeMode(object):
- name = "CCC"
-
- with pytest.raises(AssertionError):
- cipher = FakeCipher()
- mode = FakeMode()
- api.create_block_cipher_context(cipher, mode)
+ def test_supports_cipher(self):
+ assert api.supports_cipher("not-a-real-cipher") is False