#NEWLINE# def test_redirect_view( ) : #NEWLINE# #INDENT# target = '/{wat}/{_request.method}' #NEWLINE# view = redirects . redirect_view_factory ( target ) #NEWLINE# request = pretend . stub ( method = 'GET' , matchdict = { #NEWLINE# #INDENT# 'wat' : 'the-thing' , #NEWLINE# #UNINDENT# } ) #NEWLINE# resp = view ( request ) #NEWLINE# assert isinstance ( resp , HTTPMovedPermanently ) #NEWLINE# assert ( resp . headers [ 'Location' ] == '/the-thing/GET' )