#NEWLINE# def test_all_day_event_cook_slots( self ) : #NEWLINE# #INDENT# cal = Calendar ( name = 'MyCal' , slug = 'MyCalSlug' ) #NEWLINE# cal . save ( ) #NEWLINE# start = datetime . datetime ( datetime . datetime . now ( ) . year , 1 , 5 , 0 , 0 , tzinfo = pytz . utc ) #NEWLINE# end = datetime . datetime ( datetime . datetime . now ( ) . year , 1 , 6 , 0 , 0 , tzinfo = pytz . utc ) #NEWLINE# data = { #NEWLINE# #INDENT# 'title' : 'All Day Event' , #NEWLINE# 'start' : start , #NEWLINE# 'end' : end , #NEWLINE# 'calendar' : self . cal , #NEWLINE# #UNINDENT# } #NEWLINE# event = Event ( ** data ) #NEWLINE# event . save ( ) #NEWLINE# period = Day ( [ start ] , start , end ) #NEWLINE# slots = _cook_slots ( period , 60 ) #NEWLINE# self . assertEqual ( len ( slots ) , 24 )