#NEWLINE# def test_edit_product( self ) : #NEWLINE# #INDENT# 'Can edit product name and description, with modified-by user.' #NEWLINE# p = self . F . ProductFactory ( name = 'Take One' , description = '' ) #NEWLINE# u = self . F . UserFactory ( ) #NEWLINE# f = self . form ( { #NEWLINE# #INDENT# 'name' : 'Two' , #NEWLINE# 'description' : 'not blank' , #NEWLINE# 'cc_version' : str ( p . cc_version ) , #NEWLINE# #UNINDENT# } , instance = p , user = u ) #NEWLINE# product = f . save ( ) #NEWLINE# self . assertEqual ( product . name , 'Two' ) #NEWLINE# self . assertEqual ( product . description , 'not blank' ) #NEWLINE# self . assertEqual ( product . modified_by , u )