#NEWLINE# def test_src_retained( self ) : #NEWLINE# #INDENT# a = Addon . objects . get ( pk = 7661 ) #NEWLINE# a . suggested_amount = '12' #NEWLINE# settings = Mock ( ) #NEWLINE# settings . MAX_CONTRIBUTION = 5 #NEWLINE# request = Mock ( ) #NEWLINE# c = { #NEWLINE# #INDENT# 'LANG' : 'en-us' , #NEWLINE# 'APP' : amo . FIREFOX , #NEWLINE# 'settings' : settings , #NEWLINE# 'request' : request , #NEWLINE# #UNINDENT# } #NEWLINE# s = contribution ( c , a , contribution_src = 'browse' ) #NEWLINE# doc = PyQuery ( s ) #NEWLINE# assert ( doc ( 'input[name=source]' ) . attr ( 'value' ) == 'browse' )