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/primitives/test_dh.py | |
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/primitives/test_dh.py')
-rw-r--r-- | tests/hazmat/primitives/test_dh.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/hazmat/primitives/test_dh.py b/tests/hazmat/primitives/test_dh.py index 25be51c9..a70ae745 100644 --- a/tests/hazmat/primitives/test_dh.py +++ b/tests/hazmat/primitives/test_dh.py @@ -13,7 +13,7 @@ from cryptography.hazmat.backends.interfaces import ( DERSerializationBackend, DHBackend, PEMSerializationBackend) from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import dh -from cryptography.utils import bit_length, int_from_bytes +from cryptography.utils import int_from_bytes from ...doubles import DummyKeySerializationEncryption from ...utils import load_nist_vectors, load_vectors_from_file @@ -262,7 +262,7 @@ class TestDH(object): assert isinstance(parameters, dh.DHParametersWithSerialization) parameter_numbers = parameters.parameter_numbers() assert isinstance(parameter_numbers, dh.DHParameterNumbers) - assert bit_length(parameter_numbers.p) == key_size + assert parameter_numbers.p.bit_length() == key_size assert isinstance(public, dh.DHPublicKeyWithSerialization) assert isinstance(public.public_numbers(), dh.DHPublicNumbers) |