Skip to content
This repository was archived by the owner on Apr 20, 2025. It is now read-only.

Commit 91d0b24

Browse files
myheroyukisybrenstuvel
authored andcommitted
Fix incorrect ordering of public and private keys in test case
1 parent 2ecfeea commit 91d0b24

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_key.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ def test_blinding(self):
3939

4040
class KeyGenTest(unittest.TestCase):
4141
def test_custom_exponent(self):
42-
priv, pub = rsa.key.newkeys(16, exponent=3)
42+
pub, priv = rsa.key.newkeys(16, exponent=3)
4343

4444
self.assertEqual(3, priv.e)
4545
self.assertEqual(3, pub.e)
4646

4747
def test_default_exponent(self):
48-
priv, pub = rsa.key.newkeys(16)
48+
pub, priv = rsa.key.newkeys(16)
4949

5050
self.assertEqual(0x10001, priv.e)
5151
self.assertEqual(0x10001, pub.e)
@@ -80,7 +80,7 @@ class HashTest(unittest.TestCase):
8080
"""Test hashing of keys"""
8181

8282
def test_hash_possible(self):
83-
priv, pub = rsa.key.newkeys(16)
83+
pub, priv = rsa.key.newkeys(16)
8484

8585
# This raises a TypeError when hashing isn't possible.
8686
hash(priv)

0 commit comments

Comments
 (0)