Commit 952d24c5 authored by 冯艮霞's avatar 冯艮霞

我的-收藏-帖子-回答-头像点击

parent a475b175
...@@ -14,8 +14,18 @@ class account_request(BaseRequest): ...@@ -14,8 +14,18 @@ class account_request(BaseRequest):
self.params["face_token"] = face_token self.params["face_token"] = face_token
return self.api_send(self.loginvfc["login_vfc"]) return self.api_send(self.loginvfc["login_vfc"])
# 我的-头像点击
def account_homepage(self, user_id, device_id):
self.params["user_id"] = user_id
self.params["device_id"] = device_id
return self.api_send(self.loginvfc["account_homepage"])
if __name__ == '__main__': if __name__ == '__main__':
# print(account_request().user_info()) # print(account_request().user_info())
print(account_request.loginvfc("")) print(account_request.loginvfc(""))
\ No newline at end of file print(account_request().account_homepage("33910245", "androidid_16a95f3fa31a4c0b"))
\ No newline at end of file
...@@ -12,3 +12,12 @@ login_vfc: ...@@ -12,3 +12,12 @@ login_vfc:
isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段 isLogin: 1 #需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
account_homepage:
method: get
url: /api/account/homepage
params:
user_id: ${user_id}
device_id: ${device_id}
data:
json: {}
isLogin: 1
\ No newline at end of file
...@@ -96,6 +96,21 @@ class user_request(BaseRequest): ...@@ -96,6 +96,21 @@ class user_request(BaseRequest):
return self.api_send(self.data["favors_topics"]) return self.api_send(self.data["favors_topics"])
# 我的-收藏-帖子
def favors_tractate(self, page, count):
self.params["page"] = page
self.params["count"] = count
return self.api_send(self.data["favors_tractate"])
# 我的-收藏-回答
def favors_answers(self, page, count):
self.params["page"] = page
self.params["count"] = count
return self.api_send(self.data["favors_answers"])
...@@ -130,6 +145,12 @@ if __name__ == '__main__': ...@@ -130,6 +145,12 @@ if __name__ == '__main__':
# 我的-收藏-日记贴 # 我的-收藏-日记贴
print(user_request().favors_topics(0, 10)) print(user_request().favors_topics(0, 10))
# 我的-收藏-帖子
print(user_request().favors_tractate(1, 10))
# 我的-收藏-帖子
print(user_request().favors_answers(1, 10))
...@@ -115,3 +115,25 @@ favors_topics: ...@@ -115,3 +115,25 @@ favors_topics:
isLogin: 1 isLogin: 1
# 我的-收藏-帖子
favors_tractate:
method: GET
url: /api/user/favors/tractate
params:
page: ${page}
count: ${count}
data: {}
json: {}
isLogin: 1
# 我的-收藏-回答
favors_answers:
method: GET
url: /api/user/favors/answers
params:
page: ${page}
count: ${count}
data: {}
json: {}
isLogin: 1
\ No newline at end of file
...@@ -439,5 +439,18 @@ FAVORS_DIARIES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_dat ...@@ -439,5 +439,18 @@ FAVORS_DIARIES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_dat
#我的-收藏-日记贴 #我的-收藏-日记贴
FAVORS_TOPICS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.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") FAVORS_TOPICS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "favors_topics.yaml")
#我的-收藏-帖子
FAVORS_TRACTATE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
FAVORS_TRACTATE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "favors_tractate.yaml")
#我的-收藏-帖子
FAVORS_ANSWERS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
FAVORS_ANASWERS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "favors_answers.yaml")
#我的-头像点击
ACCOUNT_HOMEPAGE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "account_request.yaml")
ACCOUNT_HOMEPAGE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/account_data", "account_homepage.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.account_request import account_request
class TestAccount_Homepage:
data = BaseRequest().api_load(path_setting.ACCOUNT_HOMEPAGE)
account_homepage_case, account_homepage_data = get_ids(data, "account_homepage")
@pytest.mark.parametrize("param", account_homepage_data, ids=account_homepage_case)
def test_account_homepage(self, param):
r = account_request().account_homepage(param["user_id"], param["device_id"])
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 TestFavorsAnswers:
data = BaseRequest().api_load(path_setting.FAVORS_ANASWERS)
favors_answers_case, favors_answers_data = get_ids(data, "favors_answers")
@pytest.mark.parametrize("param", favors_answers_data, ids=favors_answers_case)
def test_favors_answers(self, param):
r = user_request().favors_answers(param["page"], 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 TestFavorsTractate:
data = BaseRequest().api_load(path_setting.FAVORS_TRACTATE)
favors_tractate_case, favors_tractate_data = get_ids(data, "favors_tractate")
@pytest.mark.parametrize("param", favors_tractate_data, ids=favors_tractate_case)
def test_favors_tractate(self, param):
r = user_request().favors_tractate(param["page"], param["count"])
assert r["error"] == param["assert"]
account_homepage:
#我的-头像点击
-
case: "我的页面-头像点击"
user_id: 33910245
device_id: androidid_16a95f3fa31a4c0b
assert: 0
favors_answers:
#我的-收藏-回答
-
case: "我的页面-收藏-回答"
page: 1
count: 10
assert: 0
favors_tractate:
#我的-收藏-帖子
-
case: "我的页面-收藏-帖子"
page: 1
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