#NEWLINE# def test_detail_view_with_next_cancelled_single_day_event( self ) : #NEWLINE# #INDENT# 'Test that CANCELLED shows up if next event is cancelled.' #NEWLINE# d1 = timezone . localtime ( ( timezone . now ( ) - timedelta ( days = 3 ) ) ) #NEWLINE# event = create_event ( start_date = ( d1 . year , d1 . month , d1 . day ) , end_date = ( d1 . year , d1 . month , d1 . day ) , created_by = self . user , title = 'The Event' , description = 'Blah' , repeat = 'WEEKLY' ) #NEWLINE# d2 = timezone . localtime ( ( timezone . now ( ) + timedelta ( days = 4 ) ) ) #NEWLINE# event . cancellations . create ( reason = 'Out sick' , date = d2 ) #NEWLINE# response = self . client . get ( reverse ( 'calendar:detail' , kwargs = { #NEWLINE# #INDENT# 'pk' : event . pk , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# self . assertContains ( response , 'Next event' ) #NEWLINE# self . assertContains ( response , 'CANCELLED' )