'L{changePassPhrase} exits if no passphrase is specified for the
C{getpass} call and the key is encrypted.'

def test_changePassphraseEmptyGetPass(self):

    self.patch(getpass, 'getpass', makeGetpass(''))
    filename = self.mktemp()
    FilePath(filename).setContent(privateRSA_openssh_encrypted)
    error = self.assertRaises(SystemExit, changePassPhrase, {'filename': filename})
    self.assertEqual('Could    not    change    passphrase:    Passphrase    must    be    provided    for    an    encrypted    key', str(error))
    self.assertEqual(privateRSA_openssh_encrypted, FilePath(filename).getContent())
