flask测试
测试 Testing Flask Applications Testing Flask Applications中文翻译 pytest相关文档 @pytest.fixture @pytest.mark.parametrize pytest的一个系列教程 要点提炼 Flask提供的测试渠道是使用Werkzeug的Client类 文件结构: 在应用的根文件夹中添加一个测试文件夹tests, 在里面新建各个测试脚本,名称类似test_*.py的文件会被 pytest 自动发现 conftest.py为全局配置文件,我们可以在里面实例化测试用的client和已经登陆了的client pytest的teardown是通过生成器返回执行对应语句实现的