Commit e643fddd authored by 875344244@qq.com's avatar 875344244@qq.com

次卡商详页和适用机构招募列表

parents 9d792a68 d5abd938
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
......@@ -19,6 +19,9 @@ class janus_request(BaseRequest):
#医生医院sug列表
self.data = self.api_load(path_setting.KEYWORDTIP_CONFIG)
#次卡商详页
self.data = self.api_load(path_setting.BEAUTY_CARD_DETAIL_CONFIG)
#搜索结果页-综合/百科tab
def content_v7(self, query, device_id, current_city_id, version, is_first, tab_type, offset):
#搜索词
......@@ -94,7 +97,6 @@ class janus_request(BaseRequest):
# 品类聚合页面标签和专场
def polymer(self, version, category_polymer_id, device_id):
print("fgx")
self.params['version'] = version
self.params['category_polymer_id'] = category_polymer_id
self.params['device_id'] = device_id
......@@ -186,7 +188,62 @@ class janus_request(BaseRequest):
return self.api_send(self.data['beauty_card_order_detail'])
# 次卡商详页
def beauty_card_detail(self, spu_id, sku_id, welfareId, version, current_city_id, lat, lng ):
self.params['spu_id'] = spu_id
self.params['sku_id'] = sku_id
self.params['welfareId'] = welfareId
self.params['version'] = version
self.params['current_city_id'] = current_city_id
self.params['lat'] = lat
self.params['lng'] = lng
return self.api_send(self.data["beauty_card_detail"])
# 次卡商详-适应机构列表
def service_hospital(self, offset, sku_id, size, version, current_city_id, lat, lng):
self.params['offset'] = offset
self.params['sku_id'] = sku_id
self.params['size'] = size
self.params['version'] = version
self.params['current_city_id'] = current_city_id
self.params['lat'] = lat
self.params['lng'] = lng
return self.api_send(self.data["service_hospital"])
if __name__ == '__main__':
#打印购物车-猜你喜欢列表接口返回
print(janus_request().mine_guess_you_like())
#打印商祥页-详情接口返回
print(janus_request().product_detail("5857263", "618788", "7.43.0"))
#打印商祥页-sku信息接口返回
print(janus_request().sku_info("5857263", "618788"))
#打印商祥页-美券列表-我的美券点击-744版本及以后-新接口返回
print(janus_request().product_coupon_my_list(0, 0))
#品类聚合页面商品列表接口返回
print(janus_request().tag_service())
print("fgx")
#品类聚合页面标签和专场
print(janus_request().polymer())
print("fgx")
#打印次卡-确认订单接口返回
print(janus_request().beauty_card_order_confirm("10176", 1, 1, 0))
#打印次卡-确认订单页面-修改手机号接口返回
print(janus_request().beauty_card_update_phone("+8612348543876", 1, "084430"))
#打印次卡-提交订单接口返回
print(janus_request().beauty_card_order_submit("12345678912", "10176", 1, 1, 0, 0))
#打印次卡-支付平台接口返回
print(janus_request().beauty_card_payment_method("101670448736595"))
print(janus_request().product_my_list(0, 0))
# 次卡商详页-适应机构
print(janus_request().beauty_card_detail("100018", "10046", "100018", "7.44.0", "beijing", "40.001879", "116.487194"))
# 次卡商详页
print(janus_request().service_hospital("0", "10046", "1", "7.44.0", "beijing", "40.001879", "116.487194"))
# #打印购物车-猜你喜欢列表接口返回
# print(janus_request().mine_guess_you_like())
# #打印商祥页-详情接口返回
......
......@@ -132,6 +132,37 @@ beauty_card_update_phone:
vfc_code: ${vfc_code}
json: {}
isLogin: 1
#次卡商详页
beauty_card_detail:
method: GET
url: /api/janus/beauty_card/detail
params:
spu_id: ${spu_id}
sku_id: ${sku_id}
welfareId: ${welfareId}
version: ${version}
current_city_id: ${current_city_id}
lat: ${lat}
lng: ${lng}
data: { }
json: { }
#次卡商详页-适应机构列表
service_hospital:
method: GET
url: /api/janus/beauty_card/service_hospital
params:
offset: ${offset}
sku_id: ${sku_id}
size: ${size}
version: ${version}
current_city_id: ${current_city_id}
lat: ${lat}
lng: ${lng}
data: { }
json: { }
#次卡-提交订单
beauty_card_order_submit:
......
......@@ -447,5 +447,21 @@ DELETE_RELATED_BC_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_om_api", "be
DELETE_RELATED_BC = os.path.join(BASE_DIR, "backend_auto/test_om_data/beautycard_data", "delete_related_bc.yaml")
#次卡商详页
BEAUTY_CARD_DETAIL_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
BEAUTY_CARD_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_detail.yaml")
#次卡商详页-适应机构列表
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"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.janus_request import janus_request
class TestBeautyCardDetail:
data = BaseRequest().api_load(path_setting.BEAUTY_CARD_DETAIL)
beauty_card_detail_case, beauty_card_detail_data = get_ids(data, "beauty_card_detail")
@pytest.mark.parametrize("param", beauty_card_detail_data, ids=beauty_card_detail_case)
def test_beauty_card_detail(self, param):
r = janus_request().beauty_card_detail(param["spu_id"], param["sku_id"], param["welfareId"], param["version"], param["current_city_id"], param["lat"], param["lng"])
if r["error"] == 0:
assert len(r["data"]["beautycart_list"]) > param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.janus_request import janus_request
class TestServiceHospital:
data = BaseRequest().api_load(path_setting.SERVICE_HOSPITAL)
service_hospital_case, service_hospital_data = get_ids(data, "service_hospital")
@pytest.mark.parametrize("param", service_hospital_data, ids=service_hospital_case)
def test_service_hospital(self, param):
r = janus_request().service_hospital(param["offset"], param["sku_id"], param["size"], param["version"], param["current_city_id"], param["lat"], param["lng"])
if r["error"] == 0:
assert len(r["data"]["service_hospital_list"]) > 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
beauty_card_detail:
#次卡商详页
-
case: "次卡商详页spuid=100018"
assert: 0
spu_id: 100018
sku_id: 10046
welfareId: 100018
version: 7.44.0
current_city_id: beijing
lat: 40.001879
lng: 116.487194
-
case: "次卡商详页spuid=100021"
assert: 0
spu_id: 100021
sku_id: 10159
welfareId: 100021
version: 7.44.0
current_city_id: beijing
lat: 40.001879
lng: 116.487194
service_hospital:
#次卡商详页-适用机构列表
-
case: "次卡适用机构列表spuid=100018"
assert: 0
offset: 0
sku_id: 10046
size: 1
version: 7.44.0
current_city_id: beijing
lat: 40.001879
lng: 116.487194
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