#NEWLINE# def test_product_update_form( self ) : #NEWLINE# #INDENT# self . product = factories . ProductFactory ( ) #NEWLINE# url = reverse ( 'dashboard:catalogue-product' , kwargs = { #NEWLINE# #INDENT# 'pk' : self . product . id , #NEWLINE# #UNINDENT# } ) #NEWLINE# page = self . get ( url ) #NEWLINE# product_form = page . form #NEWLINE# product_form [ 'title' ] = expected_title = 'Nice T-Shirt' #NEWLINE# page = product_form . submit ( ) #NEWLINE# product = Product . objects . get ( id = self . product . id ) #NEWLINE# self . assertEqual ( page . context [ 'product' ] , self . product ) #NEWLINE# self . assertEqual ( product . title , expected_title )