#NEWLINE# def test_update_with_interpolated_redirect( self ) : #NEWLINE# #INDENT# a = Author . objects . create ( name = 'Randall Munroe' , slug = 'randall-munroe' ) #NEWLINE# res = self . client . post ( ( '/edit/author/%d/update/interpolate_redirect/' % a . pk ) , { #NEWLINE# #INDENT# 'name' : 'Randall Munroe (author of xkcd)' , #NEWLINE# 'slug' : 'randall-munroe' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertQuerysetEqual ( Author . objects . all ( ) , [ '<Author: Randall Munroe (author of xkcd)>' ] ) #NEWLINE# self . assertEqual ( res . status_code , 302 ) #NEWLINE# pk = Author . objects . all ( ) [ 0 ] . pk #NEWLINE# self . assertRedirects ( res , ( 'http://testserver/edit/author/%d/update/' % pk ) )