#NEWLINE# def test_bad_key_data( self ) : #NEWLINE# #INDENT# exc = self . assertRaises ( exception . InvalidKeypair , self . keypair_api . import_key_pair , self . ctxt , self . ctxt . user_id , 'foo' , 'bad key data' ) #NEWLINE# msg = 'Keypair data is invalid: failed to generate fingerprint' #NEWLINE# self . assertEqual ( msg , six . text_type ( msg ) )