blueprints.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:isni-reconcile 作者: cmh2166 项目源码 文件源码
def test_dotted_names_from_app(self):
        app = flask.Flask(__name__)
        app.testing = True
        test = flask.Blueprint('test', __name__)

        @app.route('/')
        def app_index():
            return flask.url_for('test.index')

        @test.route('/test/')
        def index():
            return flask.url_for('app_index')

        app.register_blueprint(test)

        with app.test_client() as c:
            rv = c.get('/')
            self.assert_equal(rv.data, b'/test/')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号