Commit 7b6616ec authored by 875344244@qq.com's avatar 875344244@qq.com

次卡商详和适用机构

parent 92007f29
No preview for this file type
......@@ -7,6 +7,7 @@ class feed_request(BaseRequest):
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)
self.data = self.api_load(path_setting.FREE_RECRUIT_BANNER_CONFIG)
def index_v9(self,tabtype,version,current_city_id):
......@@ -31,12 +32,32 @@ class feed_request(BaseRequest):
return self.api_send(self.data["community"])
# 免费招募列表的背景图片
def free_recruit_banner(self, version, json):
self.params["version"] = version
self.params["json"] = json
return self.api_send(self.data["free_recruit_banner"])
# 免费招募列表
def free_recruit_list(self, version, json, tab_type, page, size):
self.params["version"] = version
self.params["json"] = json
self.params["tab_type"] = tab_type
self.params["page"] = page
self.params["size"] = size
return self.api_send(self.data["free_recruit_list"])
if __name__ == '__main__':
print(feed_request().index_v9("choice", "7.42.2", "beijing"))
#社区tab页签到和招募活动列表
print(feed_request().config_list())
print(feed_request().config_list("7.44.0"))
#社区tab页签到和招募活动列表
print(feed_request().community())
\ No newline at end of file
#免费招募列表背景图片
print(feed_request().free_recruit_banner("7.44.1", " "))
# 免费招募列表
print(feed_request().free_recruit_list("7.44.1", " ", "1", "1", "10"))
\ No newline at end of file
......@@ -30,4 +30,29 @@ community:
tab_id: 0
data:
json: {}
isLogin: 1
#招募活动列表背景图片
free_recruit_banner:
method: get
url: /api/feed/free_recruit/free_recruit_banner
params:
version: ${version}
json: ${json}
data:
json: { }
isLogin: 1
#招募活动列表
free_recruit_list:
method: get
url: /api/feed/free_recruit/list
params:
version: ${version}
json: ${json}
tab_type: ${tab_type}
page: ${page}
size: ${size}
data:
json: { }
isLogin: 1
\ No newline at end of file
......@@ -228,5 +228,13 @@ BEAUTY_CARD_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janu
SERVICE_HOSPITAL_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
SERVICE_HOSPITAL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "service_hospital.yaml")
#免费招募背景图片
FREE_RECRUIT_BANNER_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
FREE_RECRUIT_BANNER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "free_recruit_banner.yaml")
#免费招募活动列表
FREE_RECRUIT_LIST_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
FREE_RECRUIT_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "free_recruit_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 TestFreeRecruitBanner:
data = BaseRequest().api_load(path_setting.FREE_RECRUIT_BANNER)
free_recruit_banner_case, free_recruit_banner_data = get_ids(data, "free_recruit_banner")
@pytest.mark.parametrize("param", free_recruit_banner_data, ids=free_recruit_banner_case)
def test_free_recruit_case(self, param):
r = feed_request().free_recruit_banner(param["version"], param["json"])
if r["error"] == 0:
assert r["data"]["banner"] != param["assert"]
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 TestFreeRecruitList:
data = BaseRequest().api_load(path_setting.FREE_RECRUIT_LIST)
free_recruit_list_case, free_recruit_list_data = get_ids(data, "free_recruit_list")
@pytest.mark.parametrize("param", free_recruit_list_data, ids=free_recruit_list_case)
def test_free_recruit_list(self, param):
r = feed_request().free_recruit_list(param["version"], param["json"], param["tab_type"], param["page"],param["size"])
if r["error"] == 0:
assert r["data"]["free_recruits"] != param["assert"]
free_recruit_banner:
#社区免费招募活动列表背景图片
-
case: "免费招募活动列表背景图片"
version: "7.44.0"
assert: null
json: ""
free_recruit_list:
#社区招募活动列表
-
case: "免费招募活动列表"
version: "7.44.0"
assert: null
json: ""
tab_type: 1
page: 1
size: 10
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