#NEWLINE# def test_pf_bad_action_for_actions( self ) : #NEWLINE# #INDENT# with self . app as c : #NEWLINE# #INDENT# with c . session_transaction ( ) as sess : #NEWLINE# #INDENT# self . setup_admin_login ( sess ) #NEWLINE# #UNINDENT# response = c . get ( '/manage/verbs/BAD_ACTION/GET' , follow_redirects = True ) #NEWLINE# #UNINDENT# self . assertIn ( 'Invalid action given so no action taken' , response . data , 'Incorrect flash message after bad action' ) #NEWLINE# api_settings = self . db . api_settings . find_one ( ) #NEWLINE# verbs = api_settings . get ( 'verbs' ) #NEWLINE# count = 0 #NEWLINE# for verb in verbs : #NEWLINE# #INDENT# if ( verb . get ( 'name' ) == 'GET' ) : #NEWLINE# #INDENT# count += 1 #NEWLINE# #UNINDENT# #UNINDENT# self . assertEquals ( count , 1 , ( 'Incorrect count after bad key, found %d instead of 1' % count ) )