Commit f13e6f0d authored by 冯艮霞's avatar 冯艮霞

社区签到和免费招募

parent bde756a2
......@@ -5,6 +5,7 @@ from in_common.base_request import BaseRequest
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)
def index_v9(self,tabtype,version,current_city_id):
self.params["tabtype"] = tabtype
......@@ -13,6 +14,15 @@ class feed_request(BaseRequest):
return self.api_send(self.data["index_v9"])
#社区tab页签到和招募活动列表
def config_list(self,version):
self.params["version"] = version
return self.api_send(self.data["config_list"])
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
......@@ -8,3 +8,13 @@ index_v9:
data:
json: {}
isLogin: 1
#社区tab签到和招募活动列表
config_list:
method: get
url: /api/feed/community_activity/config_list
params:
version: ${version}
data:
json: {}
isLogin: 1
......@@ -142,5 +142,9 @@ SERVICES_SHARE_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/ser
TAG_SERVICE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
TAG_SERVICE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "tag_service.yaml")
#社区tab签到和招募活动
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")
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 TestConfigList:
data = BaseRequest().api_load(path_setting.CONFIG_LIST)
configlist_case, configlist_data = get_ids(data, "config_list")
@pytest.mark.parametrize("param",configlist_data,ids=configlist_case)
def test_config_list(self,param):
r = feed_request().config_list(param["version"])
if r["error"] == 0:
assert r["data"]["config_list"][0]["type"] != param["assert"]
# else:
# assert r["data"]["config_list"][0]["type"] == param["assert1"]
config_list:
#社区tab获取签到和招募case
-
case: "社区tab签到和招募,有数据返回"
version: "7.43.0"
assert: null
assert1: 1
\ 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