#NEWLINE# def make_entry( self , **kwargs ) : #NEWLINE# #INDENT# '\n        Make a valid or invalid entry\n        make_entry(**kwargs)\n        **kwargs can include: start_time, end_time, valid\n        Without any kwargs, make_entry makes a valid entry. (first time called)\n        With valid=False, makes an invalid entry\n        start_time and end_time can be specified.\n        If start_time is used without end_time, end_time is 10 mintues later\n        ' #NEWLINE# valid = kwargs . get ( 'valid' , True ) #NEWLINE# if valid : #NEWLINE# #INDENT# default_start = self . good_start #NEWLINE# default_end = self . good_end #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# default_start = self . bad_start #NEWLINE# default_end = self . bad_end #NEWLINE# #UNINDENT# user = kwargs . get ( 'user' , self . user ) #NEWLINE# start = kwargs . get ( 'start_time' , default_start ) #NEWLINE# if ( 'end_time' in kwargs ) : #NEWLINE# #INDENT# end = kwargs . get ( 'end_time' , default_end ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'start_time' in start ) : #NEWLINE# #INDENT# end = ( start + relativedelta ( minutes = 10 ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# end = default_end #NEWLINE# #UNINDENT# #UNINDENT# data = self . default_data #NEWLINE# data . update ( { #NEWLINE# #INDENT# 'user' : user , #NEWLINE# 'start_time' : start , #NEWLINE# 'end_time' : end , #NEWLINE# #UNINDENT# } ) #NEWLINE# factories . Entry ( ** data )