From 31034a03227ebfe63f4025cd95137f116cd4236a Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 11 Oct 2017 22:01:29 -0400 Subject: Inline calls to bit_length now that it's trivial (#3966) * Inline calls to bit_length now that it's trivial * unused imports * An comment --- tests/hazmat/backends/test_openssl.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/hazmat/backends') diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py index 40e92853..e430e2d9 100644 --- a/tests/hazmat/backends/test_openssl.py +++ b/tests/hazmat/backends/test_openssl.py @@ -14,7 +14,7 @@ from pkg_resources import parse_version import pytest -from cryptography import utils, x509 +from cryptography import x509 from cryptography.exceptions import InternalError, _Reasons from cryptography.hazmat.backends.interfaces import DHBackend, RSABackend from cryptography.hazmat.backends.openssl.backend import ( @@ -141,10 +141,10 @@ class TestOpenSSL(object): def test_large_key_size_on_new_openssl(self): parameters = dsa.generate_parameters(2048, backend) param_num = parameters.parameter_numbers() - assert utils.bit_length(param_num.p) == 2048 + assert param_num.p.bit_length() == 2048 parameters = dsa.generate_parameters(3072, backend) param_num = parameters.parameter_numbers() - assert utils.bit_length(param_num.p) == 3072 + assert param_num.p.bit_length() == 3072 def test_int_to_bn(self): value = (2 ** 4242) - 4242 -- cgit v1.2.3