0
点赞
收藏
分享

微信扫一扫

Pytest学习-yaml+parametrize接口实战

boom莎卡拉卡 2022-08-06 阅读 29

一、废话不罗嗦,直接上代码

@pytest.mark.parametrize("mobile, appkey", get_data["mobile_belong_get"])
def test_mobile(mobile, appkey):

r = requests.get('https://api.binstd.com/shouji/query', params={
"shouji": mobile,
"appkey": appkey
})
print(r.status_code)
assert r.status_code == 200
print(r.json())
print("zhou")

Pytest学习-yaml+parametrize接口实战_pytest

二、yaml数据

Pytest学习-yaml+parametrize接口实战_pytest_02

举报

相关推荐

0 条评论