aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_dsa.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-10-11 22:01:29 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2017-10-12 10:01:29 +0800
commit31034a03227ebfe63f4025cd95137f116cd4236a (patch)
tree33454544ff3f1f2eec9b7225a681832dd999ebd3 /tests/hazmat/primitives/test_dsa.py
parenta87daea52b698a59664d852ecad567a742576265 (diff)
downloadcryptography-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_dsa.py')
-rw-r--r--tests/hazmat/primitives/test_dsa.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/hazmat/primitives/test_dsa.py b/tests/hazmat/primitives/test_dsa.py
index 34197772..89303fed 100644
--- a/tests/hazmat/primitives/test_dsa.py
+++ b/tests/hazmat/primitives/test_dsa.py
@@ -18,7 +18,6 @@ from cryptography.hazmat.primitives.asymmetric import dsa
from cryptography.hazmat.primitives.asymmetric.utils import (
Prehashed, encode_dss_signature
)
-from cryptography.utils import bit_length
from .fixtures_dsa import (
DSA_KEY_1024, DSA_KEY_2048, DSA_KEY_3072
@@ -82,7 +81,7 @@ class TestDSA(object):
assert skey_parameters.p == vector['p']
assert skey_parameters.q == vector['q']
assert skey_parameters.g == vector['g']
- assert skey.key_size == bit_length(vector['p'])
+ assert skey.key_size == vector['p'].bit_length()
assert pkey.key_size == skey.key_size
public_numbers = pkey.public_numbers()
assert numbers.public_numbers.y == public_numbers.y