diff options
Diffstat (limited to 'tests/crypt/test__python_rsa.py')
-rw-r--r-- | tests/crypt/test__python_rsa.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/crypt/test__python_rsa.py b/tests/crypt/test__python_rsa.py index 9ef29ee..886ee55 100644 --- a/tests/crypt/test__python_rsa.py +++ b/tests/crypt/test__python_rsa.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import io import json import os @@ -20,6 +19,7 @@ import mock from pyasn1_modules import pem import pytest import rsa +import six from google.auth import _helpers from google.auth.crypt import _python_rsa @@ -63,7 +63,7 @@ with open(SERVICE_ACCOUNT_JSON_FILE, "r") as fh: class TestRSAVerifier(object): - def test_verify_bytes_success(self): + def test_verify_success(self): to_sign = b"foo" signer = _python_rsa.RSASigner.from_string(PRIVATE_KEY_BYTES) actual_signature = signer.sign(to_sign) @@ -71,8 +71,8 @@ class TestRSAVerifier(object): verifier = _python_rsa.RSAVerifier.from_string(PUBLIC_KEY_BYTES) assert verifier.verify(to_sign, actual_signature) - def test_verify_text_success(self): - to_sign = "foo" + def test_verify_unicode_success(self): + to_sign = u"foo" signer = _python_rsa.RSASigner.from_string(PRIVATE_KEY_BYTES) actual_signature = signer.sign(to_sign) @@ -141,7 +141,7 @@ class TestRSASigner(object): def test_from_string_pkcs8_extra_bytes(self): key_bytes = PKCS8_KEY_BYTES _, pem_bytes = pem.readPemBlocksFromFile( - io.StringIO(_helpers.from_bytes(key_bytes)), _python_rsa._PKCS8_MARKER + six.StringIO(_helpers.from_bytes(key_bytes)), _python_rsa._PKCS8_MARKER ) key_info, remaining = None, "extra" |