【发布时间】:2018-06-08 00:58:11
【问题描述】:
我使用 Flask-Reatful 来构建 Flask Restful。但是当我进行单元测试时,我能够得到 hello 响应,并且登录返回了 404 的响应。
我做错了吗?
代码: https://gist.github.com/LuGuoHuas/3578cf0c8681638afb288b5d796760a4
【问题讨论】:
-
我没有看到通往“/hello”的路线——我错过了什么吗?
-
@fiacre in init.py def create_app
-
谢谢。在测试setUp方法中,你会打印self.app吗?
-
@fiacre print self.app is
and print self.client is >.like this? -
@fiacre 我在 self.app 中只看到两条规则,/hello 和 /static/
标签: python flask python-3.6 flask-restful