#NEWLINE# def test_award_detail_includes_nomination_autoapproved( self ) : #NEWLINE# #INDENT# 'Auto-approved nomination should be indicated 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# b2 = Badge . objects . create ( creator = creator , title = 'Badge to awarded 2' ) #NEWLINE# b2 . nominations_autoapproved = True #NEWLINE# b2 . save ( ) #NEWLINE# ok_ ( ( not b2 . is_awarded_to ( awardee ) ) ) #NEWLINE# nomination = b2 . nominate_for ( nominator = nominator , nominee = awardee ) #NEWLINE# nomination . accept ( awardee ) #NEWLINE# ok_ ( b2 . is_awarded_to ( awardee ) ) #NEWLINE# award = Award . objects . get ( badge = b2 , user = awardee ) #NEWLINE# r = self . client . get ( award . get_absolute_url ( ) , follow = True ) #NEWLINE# eq_ ( 200 , r . status_code ) #NEWLINE# doc = pq ( r . content ) #NEWLINE# approved_el = doc . find ( '.award .nomination_approved_by .autoapproved' ) #NEWLINE# eq_ ( approved_el . length , 1 )