#NEWLINE# def test_total_time( self ) : #NEWLINE# #INDENT# '\n        Does the template context have the correct total time for iterations?\n        ' #NEWLINE# user = self . matt #NEWLINE# username = self . matt . username #NEWLINE# pearl = mommy . make ( 'core.Pearl' , minutes = 3 , user = user ) #NEWLINE# mommy . make ( 'core.Iteration' , date = date . today ( ) , pearl = pearl ) #NEWLINE# mommy . make ( 'core.Iteration' , date = date . today ( ) , pearl = pearl ) #NEWLINE# mommy . make ( 'core.Iteration' , date = date . today ( ) , pearl = pearl ) #NEWLINE# url = reverse ( 'edition_today' , args = [ username ] ) #NEWLINE# request = self . factory . get ( url ) #NEWLINE# response = TodayEditionView . as_view ( ) ( request , user = username ) #NEWLINE# self . assertEqual ( response . context_data [ 'total_time' ] , '9 minutes' )