Commit 873442d0 authored by 张淑琴's avatar 张淑琴

新提交

parents c17a171d 888722a0
......@@ -5,7 +5,7 @@ from in_common.base_request import BaseRequest
class answer_request(BaseRequest):
def __init__(self):
self.abc = self.api_load(path_setting.DETAIL_CONFIG)
print(self.data)
# print(self.abc)
# 回答详情页
def detail(self, current_city_id, answer_id=""):
......
import path_setting
from in_common.base_request import BaseRequest
class hybrid_gift_list_request(BaseRequest):
def __init__(self):
self.data = self.api_load(path_setting.HYBRID_GIFT_LIST_CONFIG)
#商祥页-美券列表
def gift_list_data(self, service_id, gift_type, page):
self.params["service_id"] = service_id
self.params["gift_type"] = gift_type
self.params["page"] = page
return self.api_send(self.data["gift_list_data"])
if __name__ == '__main__':
#打印商祥页-美券列表接口返回
print(hybrid_gift_list_request().gift_list_data("5857263", 1, 1))
\ No newline at end of file
#商祥页-美券列表
gift_list_data:
method: get
url: /hybrid/gift_list/_data
params:
service_id: ${service_id}
gift_type: ${gift_type}
page: ${page}
data: {}
json: {}
isLogin: 1
\ No newline at end of file
......@@ -5,7 +5,7 @@ from in_common.base_request import BaseRequest
class question_request(BaseRequest):
def __init__(self):
self.replyanswer = self.api_load(path_setting.QUESTION_CONFIG)
print(self.data)
# print(self.replyanswer)
# 回答详情页- 一/二级评论
def reply_answer(self, current_city_id, answer_id, content, user_id=""):
......
develop_host:
# backend: http://backend.paas-develop.env
doctor: http://doctor.paas-develop.env
backend: http://backend.paas-develop.env
# doctor: http://doctor.paas-develop.env
# backend: https://backend.igengmei.com
......@@ -188,5 +188,57 @@ CONVERSATIONCOUPON = os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_d
#商祥页-详情
JANUS_PRODUCT_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "product_detail.yaml")
#商祥页-sku信息
JANUS_SKU_INFO = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "sku_info.yaml")
#商祥页-收藏
SERVICE_FAVOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/service_data", "service_favor.yaml")
#商祥页-分享
SERVICES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "services_request.yaml")
SERVICES_SHARE_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/services_data", "share_data.yaml")
#商祥页-加入购物车
SHOPCART_ADD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/shopcart_data", "add.yaml")
#商祥页-美券列表
HYBRID_GIFT_LIST_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "hybrid_gift_list_request.yaml")
GIFT_LIST_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hybrid_gift_list_data", "gift_list_data.yaml")
#捜索结果页-医生/医院tab
CONTENTV6_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "search_request.yaml")
CONTENTV6 = os.path.join(BASE_DIR, "backend_auto/test_backend_data/search_data", "content_v6.yaml")
#品类聚合页面商品列表
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")
#社区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")
#品类聚合页面标签和专场
POLYMER_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
POLYMER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "polymer.yaml")
THIRD_PHONE_LOGIN_CONFIG = os.path.join(BASE_DIR,"backend_auto/all_backend_api", "thirdphonelogin_request")
THIRD_PHONE_LOGIN =os.path.join(BASE_DIR,"backend_auto/test_backend_data/account_data","login_thirdphone")
#回答详情页点赞
VOTE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/answer_data", "vote.yaml")
#回答详情页取消点赞
CANCEL_VOTE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/answer_data", "cancel_vote.yaml")
#回答详情页- 一/二级评论
QUESTION_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "question_request.yaml")
REPLY_ANSWER = os.path.join(BASE_DIR, "backend_auto/test_backend_data/question_data", "reply_answer.yaml")
#回答详情页
DETAIL_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "answer_request.yaml")
DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/answer_data", "detail.yaml")
if __name__ == '__main__':
print("==========",LIVEYAML_CONFIG)
import pytest
from all_backend_api.hybrid_gift_list_request import hybrid_gift_list_request
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
class TestGiftListData:
data = BaseRequest().api_load(path_setting.GIFT_LIST_DATA)
gift_list_data_case, gift_list_data_data = get_ids(data, "gift_list_data")
@pytest.mark.parametrize("param", gift_list_data_data, ids=gift_list_data_case)
def test_gift_list_data(self, param):
r = hybrid_gift_list_request().gift_list_data(param["service_id"], param["gift_type"], param["page"])
if r["error"] == 0:
assert r["error"] == param["assert_error"]
gift_list_data:
-
case: "校验接口返回成功case"
service_id: 5857263
gift_type: 1
page: 1
assert_error: 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