#NEWLINE# def testLoadCaParametersWhenValueError( self ) : #NEWLINE# #INDENT# 'Test LoadCaParameters().' #NEWLINE# self . mox . StubOutWithMock ( gaeserver . util , 'GetCaParameters' ) #NEWLINE# self . mox . StubOutWithMock ( self . aps , 'LoadSelfKey' ) #NEWLINE# settings = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# ca_params = self . mox . CreateMockAnything ( ) #NEWLINE# ca_params . ca_public_cert_pem = 'ca' #NEWLINE# ca_params . server_public_cert_pem = 'spub' #NEWLINE# ca_params . server_private_key_pem = 'spriv' #NEWLINE# ca_params . required_issuer = 'ri' #NEWLINE# gaeserver . util . GetCaParameters ( settings , None ) . AndReturn ( ca_params ) #NEWLINE# self . aps . LoadSelfKey ( 'spriv' ) . AndRaise ( ValueError ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# self . assertRaises ( gaeserver . CaParametersError , self . aps . LoadCaParameters , settings ) #NEWLINE# self . mox . VerifyAll ( )