我正在尝试使用pytest-flask为Flask应用程序实现单元测试。我的查询的输出取决于当前时间。 为了一致的单元测试,我尝试冻结时间。我习惯了冻结tried,所以这是我尝试过的: # Session for scope, otherwise server is reloaded everytime
@pytest.mark.usefixture
下面是一个测试文件,它是从所有东西(除了导入)中消耗的:import pygments#fromweather_tool import *在运行pytest时:test_MonAPPflaskRest.py:3: in <module>
from flask_restful import Resour