diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2017-10-11 22:01:29 -0400 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-10-12 10:01:29 +0800 |
commit | 31034a03227ebfe63f4025cd95137f116cd4236a (patch) | |
tree | 33454544ff3f1f2eec9b7225a681832dd999ebd3 /tests/hazmat/backends | |
parent | a87daea52b698a59664d852ecad567a742576265 (diff) | |
download | cryptography-31034a03227ebfe63f4025cd95137f116cd4236a.tar.gz cryptography-31034a03227ebfe63f4025cd95137f116cd4236a.tar.bz2 cryptography-31034a03227ebfe63f4025cd95137f116cd4236a.zip |
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
Diffstat (limited to 'tests/hazmat/backends')
-rw-r--r-- | tests/hazmat/backends/test_openssl.py | 6 |
1 files changed, 3 insertions, 3 deletions
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 |