mock传参如下,再点击确认上传的时候调用VodUploader报错,错误信息{code: -2, message: "cos error"}
self.app.mock_wx_method(
"chooseVideo",
result={
"errMsg": "chooseVideo:ok",
"tempFilePath": "http://1500010075.vod2.myqcloud.com/439377ddvodtranscq1500010075"
"/21717670243791580450179361/m.v.f100020.mp4"
}
)
page_add_works.click(page_add_works.get_choose_video())
self.app.restore_wx_method("chooseVideo")
upload接口不支持http://xxxx这种路径的,需要本地路径。可以mock之前先download产生一个本地路径再进行mock