#NEWLINE# def testApproveButton( self ) : #NEWLINE# #INDENT# self . login_as_admin ( ) #NEWLINE# response = self . client . get ( self . sheet_url ) #NEWLINE# self . assertFalse ( response . context [ 'show_approve' ] ) #NEWLINE# entry = factories . Entry ( ** { #NEWLINE# #INDENT# 'user' : self . user , #NEWLINE# 'start_time' : ( timezone . now ( ) - relativedelta ( hours = 1 ) ) , #NEWLINE# 'end_time' : timezone . now ( ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# response = self . client . get ( self . sheet_url ) #NEWLINE# self . assertFalse ( response . context [ 'show_approve' ] ) #NEWLINE# entry . status = Entry . VERIFIED #NEWLINE# entry . save ( ) #NEWLINE# response = self . client . get ( self . sheet_url ) #NEWLINE# self . assertTrue ( response . context [ 'show_approve' ] ) #NEWLINE# entry . status = Entry . APPROVED #NEWLINE# entry . save ( ) #NEWLINE# response = self . client . get ( self . sheet_url ) #NEWLINE# self . assertFalse ( response . context [ 'show_approve' ] )