diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2018-01-10 08:17:09 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2018-01-10 08:17:09 -0500 |
commit | d2c12683d3ddf454f99673ad7878673b60998b3e (patch) | |
tree | 81db84338c9671db93fcedf9a00a818081ca5f13 /tests/test_cryptography_utils.py | |
parent | 038146fdc7a515937398f226531ef15d2674b3b9 (diff) | |
download | cryptography-d2c12683d3ddf454f99673ad7878673b60998b3e.tar.gz cryptography-d2c12683d3ddf454f99673ad7878673b60998b3e.tar.bz2 cryptography-d2c12683d3ddf454f99673ad7878673b60998b3e.zip |
Fixes #4076 - simplify the implementation of int_from_bytes on python2 (#4077)
* Fixes #4076 - simplify the implementation of int_from_bytes on python2
* whitespace
* Added a test
Diffstat (limited to 'tests/test_cryptography_utils.py')
-rw-r--r-- | tests/test_cryptography_utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test_cryptography_utils.py b/tests/test_cryptography_utils.py index 320f7aa8..ddea7602 100644 --- a/tests/test_cryptography_utils.py +++ b/tests/test_cryptography_utils.py @@ -11,6 +11,8 @@ from cryptography import utils def test_int_from_bytes_bytearray(): assert utils.int_from_bytes(bytearray(b"\x02\x10"), "big") == 528 + with pytest.raises(TypeError): + utils.int_from_bytes(["list", "is", "not", "bytes"], "big") class TestCachedProperty(object): |