<s> from flask import Flask , Blueprint <EOL> from . view_classes import BasicView , IndexView <EOL> from nose . tools import * <EOL> app = Flask ( "<STR_LIT>" ) <EOL> bp = Blueprint ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> BasicView . register ( bp ) <EOL> IndexView . register ( bp ) <EOL> app . register_blueprint ( bp ) <EOL> client = app . test_client ( ) <EOL> def test_bp_index ( ) : <EOL> resp = client . get ( "<STR_LIT>" ) <EOL> eq_ ( b"<STR_LIT>" , resp . data ) <EOL> def test_bp_get ( ) : <EOL> resp = client . get ( "<STR_LIT>" ) <EOL> eq_ ( b"<STR_LIT>" , resp . data ) <EOL> def test_bp_put ( ) : <EOL> resp = client . put ( "<STR_LIT>" ) <EOL> eq_ ( b"<STR_LIT>" , resp . data ) <EOL> def test_bp_patch ( ) : <EOL> resp = client . patch ( "<STR_LIT>" ) <EOL> eq_ ( b"<STR_LIT>" , resp . data ) <EOL> def test_bp_post ( ) : <EOL> resp = client . post ( "<STR_LIT>" ) <EOL> eq_ ( b"<STR_LIT>" , resp . data ) <EOL> def test_bp_delete ( ) : <EOL> resp = client . delete ( "<STR_LIT>" ) <EOL> eq_ ( b"<STR_LIT>" , resp . data ) <EOL> def test_bp_custom_method ( ) : <EOL> resp = client . get ( "<STR_LIT>" ) <EOL> eq_ ( b"<STR_LIT>" , resp . data ) <EOL> def test_bp_custom_method_with_params ( ) : <EOL> resp = client . get ( "<STR_LIT>" ) <EOL> eq_ ( b"<STR_LIT>" , resp . data ) <EOL> def test_bp_routed_method ( ) : <EOL> resp = client . get ( "<STR_LIT>" ) <EOL> eq_ ( b"<STR_LIT>" , resp . data ) <EOL> def test_bp_multi_routed_method ( ) : <EOL> resp = client . get ( "<STR_LIT>" ) <EOL> eq_ ( b"<STR_LIT>" , resp . data ) <EOL> resp = client . get ( "<STR_LIT>" ) <EOL> eq_ ( b"<STR_LIT>" , resp . data ) <EOL> def test_bp_no_slash ( ) : <EOL> resp = client . get ( "<STR_LIT>" ) <EOL> eq_ ( b"<STR_LIT>" , resp . data ) <EOL> def test_bp_index_view_index ( ) : <EOL> resp = client . get ( "<STR_LIT:/>" ) <EOL> eq_ ( b"<STR_LIT>" , resp . data ) <EOL> def test_bp_custom_http_method ( ) : <EOL> resp = client . post ( "<STR_LIT>" ) <EOL> eq_ ( b"<STR_LIT>" , resp . data ) <EOL> def test_bp_url_prefix ( ) : <EOL> foo = Blueprint ( '<STR_LIT:foo>' , __name__ ) <EOL> BasicView . register ( foo , route_base = "<STR_LIT:/>" ) <EOL> app . register_blueprint ( foo , url_prefix = '<STR_LIT>' ) <EOL> resp = client . get ( '<STR_LIT>' ) <EOL> eq_ ( b"<STR_LIT>" , resp . data ) </s>
