'L{displayPublicKey} prints out the public key associated with a given
private key using the given passphrase when it\'s encrypted.'

def test_displayPublicKeyEncrypted(self):

    filename = self.mktemp()
    pubKey = Key.fromString(publicRSA_openssh)
    FilePath(filename).setContent(privateRSA_openssh_encrypted)
    displayPublicKey({'filename': filename, 'pass': 'encrypted'})
    displayed = self.stdout.getvalue().strip('\n')
    if isinstance(displayed, unicode):
        displayed = displayed.encode('ascii')
    self.assertEqual(displayed, pubKey.toString('openssh'))
