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