Commit df80bd32 authored by 张伟男's avatar 张伟男

Merge branch 'common_dev' into zwn_dev

parents b47b8e4a cf518550
...@@ -52,9 +52,10 @@ class user_request(BaseRequest): ...@@ -52,9 +52,10 @@ class user_request(BaseRequest):
self.params["count"] = count self.params["count"] = count
return self.api_send(self.data["my_diary_v2"]) return self.api_send(self.data["my_diary_v2"])
# 我的-日记 # 我的-帖子-我发布的
def user_tractate(self, page, count): def user_tractate(self, page, count):
self.params["page"] = page self.params["page"] = page
...@@ -63,6 +64,38 @@ class user_request(BaseRequest): ...@@ -63,6 +64,38 @@ class user_request(BaseRequest):
return self.api_send(self.data["user_tractate"]) return self.api_send(self.data["user_tractate"])
# 我的-帖子-我回复的
def reply_tractate(self, page, count, version):
self.params["page"] = page
self.params["count"] = count
self.params["version"] = version
return self.api_send(self.data["reply_tractate"])
# 我的-问题
def my_question(self, start_num, count):
self.params["start_num"] = start_num
self.params["count"] = count
return self.api_send(self.data["my_question"])
# 我的-收藏
def favors_services(self, start_num, count, current_city_id, device_id, version):
self.params["start_num"] = start_num
self.params["count"] = count
self.params["current_city_id"] = current_city_id
self.params["device_id"] = device_id
self.params["version"] = version
return self.api_send(self.data["favors_services"])
if __name__ == '__main__': if __name__ == '__main__':
#个人中心 #个人中心
print(user_request().personal_center()) print(user_request().personal_center())
...@@ -79,6 +112,15 @@ if __name__ == '__main__': ...@@ -79,6 +112,15 @@ if __name__ == '__main__':
#我的-日记 #我的-日记
print(user_request().my_diary_v2(0, 10)) print(user_request().my_diary_v2(0, 10))
#我的-帖子 #我的-帖子-我发布的
print(user_request().user_tractate(1, 10)) print(user_request().user_tractate(1, 10))
#我的-问题
print(user_request().my_question(0, 10))
#我的-问题
print(user_request().favors_services(0, 10, "beijing", "androidid_16a95f3fa31a4c0b", "7.46.0"))
#我的-帖子-我回复的
print(user_request().reply_tractate(1, 10, "7.46.0"))
...@@ -72,7 +72,7 @@ my_diary_v2: ...@@ -72,7 +72,7 @@ my_diary_v2:
isLogin: 1 isLogin: 1
# 我的-帖子 # 我的-帖子-我发布的
user_tractate: user_tractate:
method: GET method: GET
url: /api/user/tractate url: /api/user/tractate
...@@ -83,3 +83,41 @@ user_tractate: ...@@ -83,3 +83,41 @@ user_tractate:
json: {} json: {}
isLogin: 1 isLogin: 1
# 我的-问题
my_question:
method: GET
url: /api/user/my_question
params:
start_num: ${start_num}
count: ${count}
data: {}
json: {}
isLogin: 1
# 我的-收藏
favors_services:
method: GET
url: /api/user/favors/services
params:
start_num: ${start_num}
count: ${count}
current_city_id: ${current_city_id}
device_id: ${device_id}
version: ${version}
data: {}
json: {}
isLogin: 1
# 我的-帖子-我回复的
reply_tractate:
method: GET
url: /api/user/reply/tractate
params:
page: ${page}
count: ${count}
version: ${version}
data: {}
json: {}
isLogin: 1
...@@ -84,6 +84,10 @@ class web_request(BaseRequest): ...@@ -84,6 +84,10 @@ class web_request(BaseRequest):
self.params["start_time"] = start_time self.params["start_time"] = start_time
self.params["end_time"] = end_time self.params["end_time"] = end_time
return self.api_send(self.ACCOUNT_URL["cpc_community_data_info"]) return self.api_send(self.ACCOUNT_URL["cpc_community_data_info"])
def cpc_community_click_logs(self,page):
"点点通-内容-推广明细"
self.params["page"] = page
return self.api_send(self.ACCOUNT_URL["cpc_community_click_logs"])
...@@ -114,3 +118,4 @@ if __name__ == '__main__': ...@@ -114,3 +118,4 @@ if __name__ == '__main__':
print(web_request().cpc_community_homepage()) print(web_request().cpc_community_homepage())
print(web_request().cpc_community_diaries()) print(web_request().cpc_community_diaries())
print(web_request().cpc_community_data_info("15604767","2021-07-02","2021-07-12")) print(web_request().cpc_community_data_info("15604767","2021-07-02","2021-07-12"))
print(web_request().cpc_community_click_logs(1))
\ No newline at end of file
...@@ -181,3 +181,12 @@ cpc_community_data_info: ...@@ -181,3 +181,12 @@ cpc_community_data_info:
data: {} data: {}
json: {} json: {}
isLogin: 1 #需要登录 isLogin: 1 #需要登录
cpc_community_click_logs:
method: get
url: /api/web/cpc_community/click_logs
params:
page: ${page}
data: {}
json: {}
isLogin: 1 #需要登录
...@@ -443,6 +443,8 @@ CPCCOMMUNITYHOMEPAGE=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_d ...@@ -443,6 +443,8 @@ CPCCOMMUNITYHOMEPAGE=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_d
CPCCOMMUNITYDIARIES=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_community_diaries.yaml") CPCCOMMUNITYDIARIES=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_community_diaries.yaml")
#医生后台-点点通内容-数据统计 #医生后台-点点通内容-数据统计
CPCCOMMUNITYDATAINFO=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_community_data_info.yaml") CPCCOMMUNITYDATAINFO=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_community_data_info.yaml")
#医生后台-点点通内容-推广明细
CPCCOMMUNITYCLICKLOGS=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "cpc_community_click_logs.yaml")
#更美次卡橱窗组件商品 #更美次卡橱窗组件商品
...@@ -589,10 +591,21 @@ WINNING_USER_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_ ...@@ -589,10 +591,21 @@ WINNING_USER_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_
MY_DIARY_V2_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml") MY_DIARY_V2_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
MY_DIARY_V2 = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "my_diary_v2.yaml") MY_DIARY_V2 = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "my_diary_v2.yaml")
#我的-帖子 #我的-帖子-我发布的
USER_TRACTATE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml") USER_TRACTATE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
USER_TRACTATE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "user_tractate.yaml") USER_TRACTATE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "user_tractate.yaml")
#我的-问题
MY_QUESTION_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
MY_QUESTION = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "my_question.yaml")
#我的-收藏
FAVORS_SERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
FAVORS_SERVICES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "favors_services.yaml")
#我的-帖子-我回复的
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")
if __name__ == '__main__': if __name__ == '__main__':
print("==========",LIVEYAML_CONFIG) 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.user_request import user_request
class TestFavorsServices:
data = BaseRequest().api_load(path_setting.FAVORS_SERVICES)
favors_services_case, favors_services_data = get_ids(data, "favors_services")
@pytest.mark.parametrize("param", favors_services_data, ids=favors_services_case)
def test_favors_services(self, param):
r = user_request().favors_services(param["start_num"], param["count"], param["current_city_id"], param["device_id"], param["version"])
assert r["error"] == param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.user_request import user_request
class TestMyQuestion:
data = BaseRequest().api_load(path_setting.MY_QUESTION)
my_question_case, my_question_data = get_ids(data, "my_question")
@pytest.mark.parametrize("param", my_question_data, ids=my_question_case)
def test_my_question(self, param):
r = user_request().my_question(param["start_num"], param["count"])
assert r["error"] == param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.user_request import user_request
class TestReplyTractate:
data = BaseRequest().api_load(path_setting.REPLY_TRACTATE)
reply_tractate_case, reply_tractate_data = get_ids(data, "reply_tractate")
@pytest.mark.parametrize("param", reply_tractate_data, ids= reply_tractate_case)
def test_reply_tractate(self, param):
r = user_request().reply_tractate(param["page"], param["count"], param["version"])
assert r["error"] == param["assert"]
favors_services:
#我的-收藏
-
case: "我的页面-收藏"
start_num: 0
count: 10
current_city_id: "beijing"
device_id: "androidid_16a95f3fa31a4c0b"
version: "7.46.0"
assert: 0
my_question:
#我的-问题
-
case: "我的页面-问题"
start_num: 0
count: 10
assert: 0
reply_tractate:
#我的-帖子
-
case: "我的页面-帖子-我回复的"
page: 1
count: 10
version: 7.46.0
assert: 0
user_tractate: user_tractate:
- -
#我的-帖子 #我的-帖子-我发布的
case: "我的页面-帖子" case: "我的页面-帖子-我发布的"
page: 1 page: 1
count: 10 count: 10
assert: 0 assert: 0
......
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web_request import web_request
class TestCpcCommunityClickLogs:
data = BaseRequest().api_load(path_setting.CPCCOMMUNITYCLICKLOGS)
cpccommunityclicklogs_case, cpccommunityclicklogs_data = get_ids(data, "cpc_community_click_logs")
@pytest.mark.parametrize("param",cpccommunityclicklogs_data,ids=cpccommunityclicklogs_case)
def test_cpc_community_click_logs(self, param):
'''点点通内容-数据统计'''
r = web_request().cpc_community_click_logs(param["page"])
if r["error"] == 0:
click_list = r.get("data").get("click_list", [])
assert len(click_list) >= param["assert"]
cpc_community_click_logs:
#点点通内容-推广明细case
-
case: "点点通内容-推广明细"
page: 1
assert: 0
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