#NEWLINE# def test_flags( self ) : #NEWLINE# #INDENT# ctx = { #NEWLINE# #INDENT# 'APP' : amo . FIREFOX , #NEWLINE# 'LANG' : 'en-US' , #NEWLINE# #UNINDENT# } #NEWLINE# a = Addon ( status = amo . STATUS_UNREVIEWED ) #NEWLINE# assert ( flag ( ctx , a ) == '<h5 class="flag">Not Reviewed</h5>' ) #NEWLINE# featured = Addon . objects . get ( pk = 1003 ) #NEWLINE# assert ( flag ( ctx , featured ) == '<h5 class="flag">Featured</h5>' ) #NEWLINE# featured = Addon . objects . get ( pk = 1001 ) #NEWLINE# assert ( flag ( ctx , ctx ) == '<h5 class="flag">Featured</h5>' )