def test_SetOsd(self): api = '/SetOsd' url = ip + api # 接口 datas = { "mode_id": {0}, "main_pic": '{"pos_x":160,"pos_y":100,"show":0,"type":9}', "sub_pic": '{"pos_x":160,"pos_y":200,"show":0,"type":9}', "main_title": '{"pos_x":870,"pos_y":0,"font_size":60,"font_dir":1,"font_color":4,"show":0,"type":9}', "sub_title": '{"pos_x":900,"pos_y":80,"font_size":40,"font_dir":1,"font_color":4,"show":0,"type":9}', "text": '{"pos_x":940,"pos_y":900,"font_size":50,"font_color":4,"font_dir":1,"show":0,"type":9}', "time": '{"pos_x":100,"pos_y":100,"font_size":30,"font_color":0,"show":0,"type":9}' } log.info('osd模板设置') sendRequest().all_send_request(method="post", url=url, params=datas) 更正写法
时间: 2023-08-12 12:05:52 浏览: 272
def test_SetOsd(self):
api = '/SetOsd'
url = ip + api # 接口
datas = {
"mode_id": [0],
"main_pic": '{"pos_x":160,"pos_y":100,"show":0,"type":9}',
"sub_pic": '{"pos_x":160,"pos_y":200,"show":0,"type":9}',
"main_title": '{"pos_x":870,"pos_y":0,"font_size":60,"font_dir":1,"font_color":4,"show":0,"type":9}',
"sub_title": '{"pos_x":900,"pos_y":80,"font_size":40,"font_dir":1,"font_color":4,"show":0,"type":9}',
"text": '{"pos_x":940,"pos_y":900,"font_size":50,"font_color":4,"font_dir":1,"show":0,"type":9}',
"time": '{"pos_x":100,"pos_y":100,"font_size":30,"font_color":0,"show":0,"type":9}'
}
log.info('osd模板设置')
sendRequest().all_send_request(method="post", url=url, data=datas)
阅读全文