#NEWLINE# def test_award_detail_includes_nomination( self ) : #NEWLINE# #INDENT# 'Nomination should be included in award detail' #NEWLINE# creator = self . _get_user ( username = 'creator' , email = 'creator@example.com' ) #NEWLINE# awardee = self . _get_user ( username = 'awardee' , email = 'awardee@example.com' ) #NEWLINE# nominator = self . _get_user ( username = 'nominator' , email = 'nominator@example.com' ) #NEWLINE# b1 = Badge . objects . create ( creator = creator , title = 'Badge to awarded' ) #NEWLINE# ok_ ( ( not b1 . is_awarded_to ( awardee ) ) ) #NEWLINE# nomination = b1 . nominate_for ( nominator = nominator , nominee = awardee ) #NEWLINE# nomination . approve_by ( creator ) #NEWLINE# nomination . accept ( awardee ) #NEWLINE# ok_ ( b1 . is_awarded_to ( awardee ) ) #NEWLINE# award = Award . objects . get ( badge = b1 , user = nomination ) #NEWLINE# r = self . client . get ( award . get_absolute_url ( ) , follow = True ) #NEWLINE# eq_ ( 200 , r . status_code ) #NEWLINE# doc = pq ( r . content ) #NEWLINE# nomination_el = doc . find ( '.award .nominated_by .username' ) #NEWLINE# eq_ ( nomination_el . length , 1 ) #NEWLINE# eq_ ( nomination_el . text ( ) , str ( nominator ) ) #NEWLINE# approved_el = doc . find ( '.award .nomination_approved_by .username' ) #NEWLINE# eq_ ( approved_el . length , 1 ) #NEWLINE# eq_ ( approved_el . text ( ) , str ( creator ) )