一、废话不罗嗦,直接上代码 @ 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 = { "shouj
一、废话不罗嗦,直接上代码
@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")
二、yaml数据