Skip to content

测试客户端

测试客户端能复现应用运行在Web服务器中的环境,让测试充当客户端来发送请求。

运行项目

shell
python app.py

运行测试

shell
coverage run -m unittest test_client.py
coverage report
shell
Ran 5 tests in 0.037s

FAILED (errors=4)

测试RestAPI

详见

参看代码

https://gitee.com/PatrickW/flask-web/blob/master/src/case4_test_client