def testCheckValuePemRsaPrivateKeyWhenBadlyFormed(self):
    k = 'k'
    pem_cert = 'pem'

    self.mox.StubOutWithMock(settings.x509, 'LoadRSAPrivateKeyFromPEM')
    settings.x509.LoadRSAPrivateKeyFromPEM(pem_cert).AndRaise(
        settings.x509.Error)

    self.mox.ReplayAll()
    self.assertRaises(
        ValueError, self.settings.CheckValuePemRsaPrivateKey, k, pem_cert)
    self.mox.VerifyAll()
Invoke the on_channel_close code in the specified channel. This will
dataset/ETHPy150Open google/simian/src/tests/simian/settings_test.py/BaseSettingsTest.testCheckValuePemRsaPrivateKeyWhenBadlyFormed--crossover with--dataset/ETHPy150Open gmr/rabbitpy/rabbitpy/io.py/IO._remote_close_channel