Commit 832af755 authored by 冯艮霞's avatar 冯艮霞

Merge branch 'fgx_dev' into common_dev

parents 51e7844a eb5e12d0
......@@ -6,6 +6,8 @@ class feed_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.FEED_INDEXV9_CONFIG)
self.data = self.api_load(path_setting.CONFIG_LIST_CONFIG)
self.data = self.api_load(path_setting.COMMUNITY_CONFIG)
def index_v9(self,tabtype,version,current_city_id):
self.params["tabtype"] = tabtype
......@@ -20,9 +22,21 @@ class feed_request(BaseRequest):
return self.api_send(self.data["config_list"])
# 社区tab页feed流
def community(self, version, tabtype, tags_id, tab_id):
self.params["version"] = version
self.params["tabtype"] = tabtype
self.params["tags_id"] = tags_id
self.params["tab_id"] = tab_id
return self.api_send(self.data["community"])
if __name__ == '__main__':
print(feed_request().index_v9("choice", "7.42.2", "beijing"))
#社区tab页签到和招募活动列表
print(feed_request().config_list())
\ No newline at end of file
print(feed_request().config_list())
#社区tab页签到和招募活动列表
print(feed_request().community())
\ No newline at end of file
......@@ -18,3 +18,16 @@ config_list:
data:
json: {}
isLogin: 1
#社区tab页feed流
community:
method: get
url: /api/feed/index/community
params:
version: ${version}
tabtype: choice
tags_id: []
tab_id: 0
data:
json: {}
isLogin: 1
\ No newline at end of file
......@@ -150,5 +150,11 @@ TAG_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data"
CONFIG_LIST_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
CONFIG_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "config_list.yaml")
#社区tabfeed流
COMMUNITY_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
COMMUNITY = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "community.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.feed_request import feed_request
class TestCommunity:
data = BaseRequest().api_load(path_setting.COMMUNITY)
community_case, community_data = get_ids(data, "community")
@pytest.mark.parametrize("param", community_data, ids=community_case)
def test_community(self, param):
r = feed_request().community(param["version"], param["tabtype"], param["tags_id"], param["tab_id"])
if r["error"] == 0:
assert r["data"]["features"][0] != param["assert"]
# else:
# assert r["data"]["config_list"][0]["type"] == param["assert1"]
community:
#社区tab页feed流
-
case: "社区tab页 feed流"
version: "7.43.0"
assert: null
tabtype: choice
tags_id: []
tab_id: 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