summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-02-20 18:05:34 -0800
committerJeff Forcier <jeff@bitprophet.org>2017-02-20 21:03:27 -0800
commitdd7679bd89c072e1cea7147db1eeb790c8967150 (patch)
treed013e97480bb9556a014f87a48eaee77ccd8b3a6 /tests
parent448f80089fe51b5a99aa2e1c0efdd56f1cfd083e (diff)
Test proving #853, fails on Python 3 but not 2
Diffstat (limited to 'tests')
-rw-r--r--tests/test_pkey.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_pkey.py b/tests/test_pkey.py
index 2181dd91..56b0bd62 100644
--- a/tests/test_pkey.py
+++ b/tests/test_pkey.py
@@ -107,6 +107,8 @@ L4QLcT5aND0EHZLB2fAUDXiWIb2j4rg1mwPlBMiBXA==
x1234 = b'\x01\x02\x03\x04'
+TEST_KEY_BYTES = b'\x00\x00\x00\x07ssh-rsa\x00\x00\x00\x01#\x00\x00\x00\x81\x00\xd3\x8fV\xea\x07\x85\xa6k%\x8d<\x1f\xbc\x8dT\x98\xa5\x96$\xf3E#\xbe>\xbc\xd2\x93\x93\x87f\xceD\x18\xdb \x0c\xb3\xa1a\x96\xf8e#\xcc\xacS\x8a#\xefVlE\x83\x1epv\xc1o\x17M\xef\xdf\x89DUXL\xa6\x8b\xaa<\x06\x10\xd7\x93w\xec\xaf\xe2\xaf\x95\xd8\xfb\xd9\xbfw\xcb\x9f0)#y{\x10\x90\xaa\x85l\tPru\x8c\t\x19\xce\xa0\xf1\xd2\xdc\x8e/\x8b\xa8f\x9c0\xdey\x84\xd2F\xf7\xcbmm\x1f\x87'
+
class KeyTest (unittest.TestCase):
@@ -427,3 +429,7 @@ class KeyTest (unittest.TestCase):
self.assertEqual(key, key2)
finally:
os.remove(newfile)
+
+ def test_stringification(self):
+ key = RSAKey.from_private_key_file(test_path('test_rsa.key'))
+ self.assertEqual(str(key), TEST_KEY_BYTES)