Commit e90b6fd2 authored by edz's avatar edz

直播-新增标签

parent 734b439a
import path_setting
from in_common.base_request import BaseRequest
class tag_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.TAG_CONFIG)
#直播开播新加标签
def tag_add(self,name):
self.params["name"] = name
return self.api_send(self.data["tag_add"])
if __name__ == '__main__':
print(tag_request().tag_add("你好"))
\ No newline at end of file
#新增标签
tag_add:
method: post
url: /api/tag/add
params: {}
data:
name: ${name}
json: {}
isLogin: 1
\ No newline at end of file
......@@ -625,5 +625,9 @@ FAVORS_SERVICES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_da
#我的-帖子-我回复的
REPLY_TRACTATE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
REPLY_TRACTATE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "reply_tractate.yaml")
#直播-新增标签
TAG_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "tag_request.yaml")
TAG_ADD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/tag_data", "tag_add.yaml")
if __name__ == '__main__':
print("==========",LIVEYAML_CONFIG)
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.tag_request import tag_request
class TestTagAdd:
data = BaseRequest().api_load(path_setting.TAG_ADD)
tag_add_case, tag_add_data = get_ids(data,"tag_add")
@pytest.mark.parametrize("param",tag_add_data, ids=tag_add_case)
def test_tag_add(self,param):
r = tag_request().tag_add(param["name"])
if r["error"] == 0:
assert r["error"] == param["assert"]
\ No newline at end of file
tag_add:
-
case: "直播-新增标签"
name: "小冤家专属标签"
assert: 0
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment