Skip to content

Commit 030e8f6

Browse files
authored
remove usage of long in test (#250)
1 parent c9e1035 commit 030e8f6

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tests/algorithms/test_RSA.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import base64
22
import json
3-
import sys
43

54
try:
65
from jose.backends.rsa_backend import RSAKey as PurePythonRSAKey
@@ -26,10 +25,6 @@
2625

2726
import pytest
2827

29-
# Deal with integer compatibilities between Python 2 and 3.
30-
# Using `from builtins import int` is not supported on AppEngine.
31-
if sys.version_info > (3,):
32-
long = int
3328

3429
private_key_4096_pkcs1 = b"""-----BEGIN RSA PRIVATE KEY-----
3530
MIIJKwIBAAKCAgEAtSKfSeI0fukRIX38AHlKB1YPpX8PUYN2JdvfM+XjNmLfU1M7
@@ -234,8 +229,8 @@ def test_python_rsa_legacy_private_key_pkcs8_to_pkcs1_invalid(self):
234229
def test_cryptography_RSA_key_instance():
235230

236231
key = pyca_rsa.RSAPublicNumbers(
237-
long(65537),
238-
long(26057131595212989515105618545799160306093557851986992545257129318694524535510983041068168825614868056510242030438003863929818932202262132630250203397069801217463517914103389095129323580576852108653940669240896817348477800490303630912852266209307160550655497615975529276169196271699168537716821419779900117025818140018436554173242441334827711966499484119233207097432165756707507563413323850255548329534279691658369466534587631102538061857114141268972476680597988266772849780811214198186940677291891818952682545840788356616771009013059992237747149380197028452160324144544057074406611859615973035412993832273216732343819),
232+
int(65537),
233+
int(26057131595212989515105618545799160306093557851986992545257129318694524535510983041068168825614868056510242030438003863929818932202262132630250203397069801217463517914103389095129323580576852108653940669240896817348477800490303630912852266209307160550655497615975529276169196271699168537716821419779900117025818140018436554173242441334827711966499484119233207097432165756707507563413323850255548329534279691658369466534587631102538061857114141268972476680597988266772849780811214198186940677291891818952682545840788356616771009013059992237747149380197028452160324144544057074406611859615973035412993832273216732343819),
239234
).public_key(default_backend())
240235

241236
pubkey = CryptographyRSAKey(key, ALGORITHMS.RS256)

0 commit comments

Comments
 (0)