#NEWLINE# def test_decorator_redirects_to_named_url_if_redirect_is_set_and_feature_is_off( self ) : #NEWLINE# #INDENT# with self . app . test_request_context ( '/' ) : #NEWLINE# #INDENT# url = url_for ( 'redirect_with_decorator' ) #NEWLINE# app . config [ FLAG_CONFIG ] [ FEATURE_NAME ] = False #NEWLINE# response = self . test_client . get ( url ) #NEWLINE# assert ( response . status_code == 302 ) , ( 'Unexpected status code %s' % response . status_code ) #NEWLINE# assert ( response . location == url_for ( 'redirect_destination' , _external = True ) ) , ( 'Expected redirect to %s, got %s => ' % ( url_for ( 'redirect_destination' ) , response . location ) )