'L{keys.Key.toString} serializes an RSA key in OpenSSH format.'

def test_toOpenSSHRSA(self):

    key = keys.Key.fromString(keydata.privateRSA_agentv3)
    self.assertEqual(key.toString('openssh'), keydata.privateRSA_openssh)
    self.assertEqual(key.toString('openssh', 'encrypted'), keydata.privateRSA_openssh_encrypted)
    self.assertEqual(key.public().toString('openssh'), keydata.publicRSA_openssh[:(-8)])
    self.assertEqual(key.public().toString('openssh', 'comment'), keydata.publicRSA_openssh)
