#NEWLINE# def test_update_with_object_url( self ) : #NEWLINE# #INDENT# a = Artist . objects . create ( name = 'Rene Magritte' ) #NEWLINE# res = self . client . post ( ( '/edit/artists/%d/update/' % a . pk ) , { #NEWLINE# #INDENT# 'name' : 'Rene Magritte' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( res . status_code , 302 ) #NEWLINE# self . assertRedirects ( res , ( 'http://testserver/detail/artist/%d/' % self . pk ) ) #NEWLINE# self . assertQuerysetEqual ( Artist . objects . all ( ) , [ '<Artist: Rene Magritte>' ] )