Commit 456751f2 authored by 冯艮霞's avatar 冯艮霞

我的-收藏-tab

parents edf059f6 a475b175
......@@ -75,7 +75,7 @@ class user_request(BaseRequest):
return self.api_send(self.data["reply_tractate"])
# 我的-问题
# 我的-问题-提问
def my_question(self, start_num, count):
self.params["start_num"] = start_num
......@@ -84,7 +84,7 @@ class user_request(BaseRequest):
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
......@@ -95,6 +95,32 @@ class user_request(BaseRequest):
return self.api_send(self.data["favors_services"])
# 我的-问题-回答
def my_answer(self, start_num, count):
self.params["start_num"] = start_num
self.params["count"] = count
return self.api_send(self.data["my_answer"])
# 我的-收藏-日记本
def favors_diaries(self, start_num, count):
self.params["start_num"] = start_num
self.params["count"] = count
return self.api_send(self.data["favors_diaries"])
# 我的-收藏-日记贴
def favors_topics(self, start_num, count):
self.params["start_num"] = start_num
self.params["count"] = count
return self.api_send(self.data["favors_topics"])
if __name__ == '__main__':
#个人中心
......@@ -123,4 +149,15 @@ if __name__ == '__main__':
#我的-帖子-我回复的
print(user_request().reply_tractate(1, 10, "7.46.0"))
# 我的-问题-回答
print(user_request().my_answer(0, 10))
# 我的-收藏-日记本
print(user_request().favors_diaries(0, 10))
# 我的-收藏-日记贴
print(user_request().favors_topics(0, 10))
......@@ -121,3 +121,39 @@ reply_tractate:
isLogin: 1
# 我的-问题-回答
my_answer:
method: GET
url: /api/user/my_answer
params:
start_num: ${start_num}
count: ${count}
data: {}
json: {}
isLogin: 1
# 我的-收藏-日记本
favors_diaries:
method: GET
url: /api/user/favors/diaries
params:
start_num: ${start_num}
count: ${count}
data: {}
json: {}
isLogin: 1
# 我的-收藏-日记贴
favors_topics:
method: GET
url: /api/user/favors/topics
params:
start_num: ${start_num}
count: ${count}
data: {}
json: {}
isLogin: 1
......@@ -650,7 +650,7 @@ USER_TRACTATE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data
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")
......@@ -658,6 +658,18 @@ 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")
#我的-问题-回答
MY_ANSWER_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
MY_ANSWER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "my_answer.yaml")
#我的-收藏-日记本
FAVORS_DIARIES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
FAVORS_DIARIES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "favors_diaries.yaml")
#我的-收藏-日记贴
FAVORS_TOPICS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
FAVORS_TOPICS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "favors_topics.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")
......
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 TestFavorsDiaries:
data = BaseRequest().api_load(path_setting.FAVORS_DIARIES)
favors_diaries_case, favors_diaries_data = get_ids(data, "favors_diaries")
@pytest.mark.parametrize("param", favors_diaries_data, ids=favors_diaries_case)
def test_favors_diaries(self, param):
r = user_request().favors_diaries(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 TestFavorsTopics:
data = BaseRequest().api_load(path_setting.FAVORS_TOPICS)
favors_topics_case, favors_topics_data = get_ids(data, "favors_topics")
@pytest.mark.parametrize("param", favors_topics_data, ids=favors_topics_case)
def test_favors_topics(self, param):
r = user_request().favors_topics(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 TestMyAnswer:
data = BaseRequest().api_load(path_setting.MY_ANSWER)
my_answer_case, my_answer_data = get_ids(data, "my_answer")
@pytest.mark.parametrize("param", my_answer_data, ids=my_answer_case)
def test_my_answer(self, param):
r = user_request().my_answer(param["start_num"], param["count"])
assert r["error"] == param["assert"]
favors_diaries:
#我的-收藏-日记本
-
case: "我的页面-收藏-日记本"
start_num: 0
count: 10
assert: 0
favors_services:
#我的-收藏
#我的-收藏-商品
-
case: "我的页面-收藏"
case: "我的页面-收藏-商品"
start_num: 0
count: 10
current_city_id: "beijing"
......
favors_topics:
#我的-收藏-日记贴
-
case: "我的页面-收藏-日记贴"
start_num: 0
count: 10
assert: 0
my_answer:
#我的-问题-回答
-
case: "我的页面-问题-回答"
start_num: 0
count: 10
assert: 0
my_question:
#我的-问题
#我的-问题-提问
-
case: "我的页面-问题"
case: "我的页面-问题-提问"
start_num: 0
count: 10
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