def testLoadCaParametersWhenError(self):
    self.mox.StubOutWithMock(gaeserver.util, 'GetCaParameters')
    self.mox.StubOutWithMock(self.aps, 'LoadSelfKey')

    settings = {}

    ca_params = self.mox.CreateMockAnything()
    ca_params.ca_public_cert_pem = 'ca'
    ca_params.server_public_cert_pem = 'spub'
    ca_params.server_private_key_pem = 'spriv'
    ca_params.required_issuer = 'ri'

    gaeserver.util.GetCaParameters(
        settings, None).AndRaise(gaeserver.util.CaParametersError)

    self.mox.ReplayAll()
    self.assertRaises(
        gaeserver.CaParametersError, self.aps.LoadCaParameters, settings)
    self.mox.VerifyAll()
Test LoadCaParameters().
dataset/ETHPy150Open google/simian/src/tests/simian/auth/gaeserver_test.py/AuthSimianServer.testLoadCaParametersWhenError