#NEWLINE# def testClockInAutoOut( self ) : #NEWLINE# #INDENT# '\n        Clocking in during an active entry automatically clocks out the current\n        entry one second before the new entry.\n        ' #NEWLINE# self . login_user ( self . user ) #NEWLINE# factories . Entry ( user = self . user , start_time = self . ten_min_ago ) #NEWLINE# data = self . clock_in_form #NEWLINE# data . update ( { #NEWLINE# #INDENT# 'start_time_0' : self . now . strftime ( '%m/%d/%Y' ) , #NEWLINE# 'start_time_1' : self . now . strftime ( '%H:%M:%S' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . client . post ( self . url , data ) #NEWLINE# entries = Entry . objects . all ( ) #NEWLINE# for entry in entries : #NEWLINE# #INDENT# if entry . is_overlapping ( ) : #NEWLINE# #INDENT# self . fail ( 'Overlapping Times' ) #NEWLINE# #UNINDENT# #UNINDENT# closed_entry = entries . get ( end_time__isnull = False ) #NEWLINE# current_entry = entries . get ( end_time__isnull = True ) #NEWLINE# self . assertEqual ( ( closed_entry . end_time + relativedelta ( seconds = 1 ) ) , entry . start_time )