summaryrefslogtreecommitdiffhomepage
path: root/tests/test_pkey.py
diff options
context:
space:
mode:
authorScott Maxwell <scott@codecobblers.com>2013-10-30 17:14:52 -0700
committerScott Maxwell <scott@codecobblers.com>2013-10-30 17:14:52 -0700
commit0b7d0cf0a23e4f16f8552ae05a66539119e2e920 (patch)
tree2ba26a535dceb8b2684adedae99fdbc4c77b3a67 /tests/test_pkey.py
parent2d738fa08b85c5065cc898d5f9e4d36ee753e871 (diff)
Convert and detect types properly, use helper constants, use StringIO and range
Diffstat (limited to 'tests/test_pkey.py')
-rw-r--r--tests/test_pkey.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_pkey.py b/tests/test_pkey.py
index 589a35d8..c7240db3 100644
--- a/tests/test_pkey.py
+++ b/tests/test_pkey.py
@@ -99,7 +99,7 @@ class KeyTest (unittest.TestCase):
self.assertEquals(PUB_RSA.split()[1], key.get_base64())
self.assertEquals(1024, key.get_bits())
- s = StringIO.StringIO()
+ s = StringIO()
key.write_private_key(s)
self.assertEquals(RSA_PRIVATE_OUT, s.getvalue())
s.seek(0)
@@ -124,7 +124,7 @@ class KeyTest (unittest.TestCase):
self.assertEquals(PUB_DSS.split()[1], key.get_base64())
self.assertEquals(1024, key.get_bits())
- s = StringIO.StringIO()
+ s = StringIO()
key.write_private_key(s)
self.assertEquals(DSS_PRIVATE_OUT, s.getvalue())
s.seek(0)
@@ -207,7 +207,7 @@ class KeyTest (unittest.TestCase):
self.assertEquals(PUB_ECDSA.split()[1], key.get_base64())
self.assertEquals(256, key.get_bits())
- s = StringIO.StringIO()
+ s = StringIO()
key.write_private_key(s)
self.assertEquals(ECDSA_PRIVATE_OUT, s.getvalue())
s.seek(0)