<s> from flask import Flask , url_for <EOL> from . view_classes import BasicView , IndexView , RouteBaseView , VarBaseView <EOL> from nose . tools import * <EOL> app = Flask ( "<STR_LIT>" ) <EOL> BasicView . register ( app ) <EOL> IndexView . register ( app ) <EOL> RouteBaseView . register ( app ) <EOL> VarBaseView . register ( app ) <EOL> client = app . test_client ( ) <EOL> def test_index_url ( ) : <EOL> with app . test_request_context ( ) : <EOL> url = url_for ( "<STR_LIT>" ) <EOL> eq_ ( "<STR_LIT:/>" , url ) <EOL> def test_basic_index_url ( ) : <EOL> with app . test_request_context ( ) : <EOL> url = url_for ( "<STR_LIT>" ) <EOL> eq_ ( "<STR_LIT>" , url ) <EOL> def test_custom_endpoint_url ( ) : <EOL> with app . test_request_context ( ) : <EOL> url = url_for ( "<STR_LIT>" ) <EOL> eq_ ( "<STR_LIT>" , url ) <EOL> def test_custom_route_base ( ) : <EOL> with app . test_request_context ( ) : <EOL> url = url_for ( '<STR_LIT>' ) <EOL> eq_ ( "<STR_LIT>" , url ) <EOL> def test_variable_route_popped_base ( ) : <EOL> with app . test_request_context ( ) : <EOL> url = url_for ( '<STR_LIT>' , route = '<STR_LIT:bar>' ) <EOL> eq_ ( '<STR_LIT>' , url ) <EOL> def test_variable_route_base ( ) : <EOL> with app . test_request_context ( ) : <EOL> url = url_for ( '<STR_LIT>' , route = '<STR_LIT:bar>' ) <EOL> eq_ ( '<STR_LIT>' , url ) <EOL> def test_variable_route_base_with_local_route_var ( ) : <EOL> client = app . test_client ( ) <EOL> resp = client . get ( '<STR_LIT>' ) <EOL> eq_ ( resp . data , b"<STR_LIT>" ) </s>
