python+pytest+requests
AI 回答
由 glm-4-flash 生成 · 仅供参考,请自行核实
1. 安装依赖
pip install pytest requests
2. 编写测试用例
import pytest
import requests
def test_get():
response = requests.get('https://api.example.com/data')
assert response.status_code == 200
3. 运行测试
pytest
pip install pytest requests
2. 编写测试用例
import pytest
import requests
def test_get():
response = requests.get('https://api.example.com/data')
assert response.status_code == 200
3. 运行测试
pytest
没有找到「python+pytest+requests」相关的内容
建议:检查关键词是否有错别字,或换一个更常见的说法。