#NEWLINE# def test_no_hours_approve( self ) : #NEWLINE# #INDENT# self . login_with_permissions ( 'approve_timesheet' , 'view_entry_summary' ) #NEWLINE# response = self . client . get ( self . approve_url ( ) , follow = True ) #NEWLINE# self . assertEquals ( response . status_code , 200 ) #NEWLINE# msg = 'You cannot verify/approve a timesheet with no hours' #NEWLINE# messages = response . context [ 'messages' ] #NEWLINE# self . assertEquals ( messages . _loaded_messages [ 0 ] . message , msg ) #NEWLINE# response = self . client . post ( self . approve_url ( ) , follow = True ) #NEWLINE# self . assertEquals ( messages . _loaded_messages [ 0 ] . message , msg )