diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2015-10-17 16:33:04 -0400 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2015-10-17 16:33:04 -0400 |
commit | 5cdfba5c8d06ed10510310de03e1df0265a89bcc (patch) | |
tree | 066d8f715bd275874ff86e9986f74520b4ecadda /tests/hazmat/backends/test_openssl.py | |
parent | 9aaeee0dc62189204f38097c815a0913fabe006c (diff) | |
download | cryptography-5cdfba5c8d06ed10510310de03e1df0265a89bcc.tar.gz cryptography-5cdfba5c8d06ed10510310de03e1df0265a89bcc.tar.bz2 cryptography-5cdfba5c8d06ed10510310de03e1df0265a89bcc.zip |
a refactor to the API
Diffstat (limited to 'tests/hazmat/backends/test_openssl.py')
-rw-r--r-- | tests/hazmat/backends/test_openssl.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py index 13162046..85331595 100644 --- a/tests/hazmat/backends/test_openssl.py +++ b/tests/hazmat/backends/test_openssl.py @@ -534,11 +534,6 @@ class DummyLibrary(object): Cryptography_HAS_EC = 0 -class DummyLibraryECDH(object): - Cryptography_HAS_EC = 1 - Cryptography_HAS_ECDH = 0 - - class TestOpenSSLEllipticCurve(object): def test_elliptic_curve_supported(self, monkeypatch): monkeypatch.setattr(backend, "_lib", DummyLibrary()) @@ -558,12 +553,9 @@ class TestOpenSSLEllipticCurve(object): def test_elliptic_curve_exchange_algorithm_supported(self, monkeypatch): monkeypatch.setattr(backend, "_lib", DummyLibrary()) - - assert backend.elliptic_curve_exchange_algorithm_supported() is False - - monkeypatch.setattr(backend, "_lib", DummyLibraryECDH()) - - assert backend.elliptic_curve_exchange_algorithm_supported() is False + assert not backend.elliptic_curve_exchange_algorithm_supported( + ec.ECDH(), ec.SECP256R1() + ) @pytest.mark.requires_backend_interface(interface=RSABackend) |