Commit be7a8551 authored by 林颖's avatar 林颖

Merge branch 'common_dev' of http://git.wanmeizhensuo.com/dengyingying/backend_auto into common_dev

# Conflicts:
#	test_backend_data/topic_data/topic_reply_create.yaml
parents 7adb23f3 77ea1dc9
......@@ -49,6 +49,27 @@ class feed_request(BaseRequest):
return self.api_send(self.data["free_recruit_list"])
# 免费招募活动详情
def free_recruit_detail(self, current_city_id, id):
self.params["current_city_id"] = current_city_id
self.params["id"] = id
return self.api_send(self.data["free_recruit_detail"])
# 招募活动获取用户抽奖状态
def user_status(self, current_city_id, recruit_id):
self.params["current_city_id"] = current_city_id
self.params["recruit_id"] = recruit_id
return self.api_send(self.data["user_status"])
# 招募活动获取中奖名单
def winning_user_lis(self, recruit_id, json):
self.params["recruit_id"] = recruit_id
self.params["json"] = json
return self.api_send(self.data["winning_user_lis"])
if __name__ == '__main__':
print(feed_request().index_v9("choice", "7.42.2", "beijing"))
......@@ -60,4 +81,13 @@ if __name__ == '__main__':
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
print(feed_request().free_recruit_list("7.44.1", " ", "1", "1", "10"))
# 免费招募活动详情
print(feed_request().free_recruit_detail("beijing", "43"))
# 免费招募获取用户状态
print(feed_request().user_status("beijing", "43"))
# 免费招募查看中奖名单
print(feed_request().winning_user_lis("44", " "))
\ No newline at end of file
......@@ -55,4 +55,37 @@ free_recruit_list:
size: ${size}
data:
json: { }
isLogin: 1
#招募活动详情
free_recruit_detail:
method: get
url: /api/feed/free_recruit/detail
params:
current_city_id: ${current_city_id}
id: ${id}
data:
json: { }
isLogin: 1
#招募活动详情
user_status:
method: get
url: /api/feed/free_recruit/user_status
params:
current_city_id: ${current_city_id}
recruit_id: ${recruit_id}
data:
json: { }
isLogin: 1
#招募活动查看中奖名单
winning_user_lis:
method: get
url: /api/feed/free_recruit/winning_user_list
params:
recruit_id: ${recruit_id}
json: ${json}
data:
json: { }
isLogin: 1
\ No newline at end of file
......@@ -52,7 +52,11 @@ class search_request(BaseRequest):
self.params["device_id"] = device_id
return self.api_send(self.data["hospital"])
if __name__ == '__main__':
# 打印购物车-猜你喜欢列表接口返回
print(search_request().hospital(82, [], "眼部整形", 10, "869378034450718"))
......@@ -48,4 +48,5 @@ hospital:
count: ${count}
device_id: ${device_id}
data: {}
json: {}
\ No newline at end of file
json: {}
......@@ -33,6 +33,23 @@ class user_request(BaseRequest):
return self.api_send(self.data["canclefavor"])
#我的-日记
def my_diary_v2(self, start_num, count):
self.params["start_num"] = start_num
self.params["count"] = count
return self.api_send(self.data["my_diary_v2"])
# 我的-日记
def user_tractate(self, page, count):
self.params["page"] = page
self.params["count"] = count
return self.api_send(self.data["user_tractate"])
if __name__ == '__main__':
#个人中心
......@@ -47,4 +64,9 @@ if __name__ == '__main__':
# print(user_request().topic_canclefavor())
#我的-日记
print(user_request().my_diary_v2(0, 10))
#我的-帖子
print(user_request().user_tractate(1, 10))
......@@ -38,3 +38,25 @@ canclefavor:
json: {}
isLogin: 1
# 我的-日记
my_diary_v2:
method: GET
url: /api/user/my_diary/v2
params:
start_num: ${start_num}
count: ${count}
data: {}
json: {}
isLogin: 1
# 我的-帖子
user_tractate:
method: GET
url: /api/user/tractate
params:
page: ${page}
count: ${count}
data: {}
json: {}
isLogin: 1
\ No newline at end of file
......@@ -528,5 +528,25 @@ FREE_RECRUIT_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_
PAGE_RULES_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "janus_request.yaml")
PAGE_RULES = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "page_rules.yaml")
#免费招募活动详情
FREE_RECRUIT_DETAIL_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
FREE_RECRUIT_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "free_recruit_detail.yaml")
#免费招募获取用户抽奖状态
USER_STATUS_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
USER_STATUS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "user_status.yaml")
#免费招募活动查看中奖名单
WINNING_USER_LIST_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "feed_request.yaml")
WINNING_USER_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_data", "winning_user_lis.yaml")
#我的-日记
MY_DIARY_V2_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
MY_DIARY_V2 = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "my_diary_v2.yaml")
#我的-帖子
USER_TRACTATE_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "user_request.yaml")
USER_TRACTATE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data", "user_tractate.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 TestFreeRecruitDetail:
data = BaseRequest().api_load(path_setting.FREE_RECRUIT_DETAIL)
free_recruit_detail_case, free_recruit_detail_data = get_ids(data, "free_recruit_detail")
@pytest.mark.parametrize("param", free_recruit_detail_data, ids=free_recruit_detail_case)
def test_free_recruit_detail_case(self, param):
r = feed_request().free_recruit_detail(param["current_city_id"], param["id"])
if r["error"] == 0:
assert r["data"]["free_recruit"]["id"] != 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 TestUserStatus:
data = BaseRequest().api_load(path_setting.USER_STATUS)
user_status_case, user_status_data = get_ids(data, "user_status")
@pytest.mark.parametrize("param", user_status_data, ids=user_status_case)
def test_user_status_case(self, param):
r = feed_request().user_status(param["current_city_id"], param["id"])
if r["error"] == 0:
assert r["data"]["is_regist"] == 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 TestWinningUserList:
data = BaseRequest().api_load(path_setting.WINNING_USER_LIST)
winning_user_list_case, winning_user_list_data = get_ids(data, "winning_user_lis")
@pytest.mark.parametrize("param", winning_user_list_data, ids=winning_user_list_case)
def test_winning_user_list_case(self, param):
r = feed_request().winning_user_lis(param["recruit_id"], param["json"])
if r["error"] == 0:
assert r["data"]["users"][0]["id"] != param["assert"]
......@@ -14,6 +14,18 @@ class TestBeautyCardOrderConfirm:
def test_beauty_card_order_confirm(self, param):
r = janus_request().beauty_card_order_confirm(param["sku_id"], param["number"], param["use_bc_coupon"], param["bc_coupon_id"])
if r["error"] == 0:
if param["number"] == 1: #购买1个sku时
assert r["error"] == param["assert_error"]
assert r["data"]["payment_total_price"] == param["assert_total_price"]
assert r["data"]["payment_total_fee"] == param["assert_total_fee"]
assert r["data"]["user_buy_lower_limit"] == param["assert_user_buy_lower_limit"]
assert r["data"]["user_buy_upper_limit"] == param["assert_user_buy_upper_limit"]
assert r["data"]["is_doctor_see"] == param["assert_is_doctor_see"]
if param["number"] == 2: #购买2个sku时
assert r["error"] == param["assert_error"]
assert r["data"]["payment_total_price"] == param["assert_total_price"]
assert r["data"]["payment_total_fee"] == param["assert_total_fee"]
assert r["data"]["user_buy_lower_limit"] == param["assert_user_buy_lower_limit"]
assert r["data"]["user_buy_upper_limit"] == param["assert_user_buy_upper_limit"]
......@@ -16,6 +16,13 @@ class TestBeautyCardOrderSubmit:
param["is_doctor_see"], param["gain_coupon_id"],
param["deduction_price"])
if r["error"] == 0:
if param["is_doctor_see"] == 1 and param["number"] == 1:
assert r["error"] == param["assert_error"]
assert r["data"]["status"] == param["assert_status"]
if param["is_doctor_see"] == 0 and param["number"] == 1:
assert r["error"] == param["assert_error"]
assert r["data"]["status"] == param["assert_status"]
if param["number"] == 2:
assert r["error"] == param["assert_error"]
assert r["data"]["status"] == param["assert_status"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.user_request import user_request
class TestMyDiaryV2:
data = BaseRequest().api_load(path_setting.MY_DIARY_V2)
mydiaryv2_case, mydiaryv2_data = get_ids(data, "my_diary_v2")
@pytest.mark.parametrize("param", mydiaryv2_data, ids=mydiaryv2_case)
def test_my_diary_v2(self, param):
r = user_request().my_diary_v2(param["start_num"], param["count"])
if r["error"] == 0:
# assert r["data"]["diaries"] >= param["assert"]
assert len(r["data"]["diaries"]) >= param["assert"]
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.user_request import user_request
class TestUserTractate:
data = BaseRequest().api_load(path_setting.USER_TRACTATE)
user_tractate_case, user_tractate_data = get_ids(data, "user_tractate")
@pytest.mark.parametrize("param", user_tractate_data, ids=user_tractate_case)
def test_user_tractate(self, param):
r = user_request().user_tractate(param["page"], param["count"])
if r["error"] == 0:
assert len(r["data"]["tractates"]) >= param["assert"]
free_recruit_detail:
#社区免费招募活动详情
-
case: "招募活动详情图片"
current_city_id: "beijing"
assert: null
id: 43
user_status:
#免费招募获取用户抽奖状态
-
case: "招募活动获取用户抽奖"
current_city_id: "beijing"
assert: true
id: 43
winning_user_lis:
#免费招募活动查看中奖名单
-
case: "招募活动查看中奖名单"
recruit_id: "44"
json:
assert: null
beauty_card_order_confirm:
-
case: "次卡-确认订单-接口调用成功case"
case: "次卡-确认订单-sku数量为1"
sku_id: "10176"
number: 1
use_bc_coupon: 1
bc_coupon_id: 0
assert_error: 0
assert_error: 0 #校验接口调用成功case
assert_total_price: "2.00" #校验订单总金额case
assert_total_fee: "2.00" #校验实付金额case
assert_user_buy_lower_limit: 1 #校验最少购买数case
assert_user_buy_upper_limit: 3 #校验最多购买数case
assert_is_doctor_see: true #校验是否同意商家电话咨询case
-
case: "次卡-确认订单-sku数量为2"
sku_id: "10176"
number: 2
use_bc_coupon: 1
bc_coupon_id: 0
assert_error: 0 #校验接口调用成功case
assert_total_price: "4.00" #校验订单总金额case
assert_total_fee: "4.00" #校验实付金额case
assert_user_buy_lower_limit: 1 #校验最少购买数case
assert_user_buy_upper_limit: 3 #校验最多购买数case
beauty_card_order_submit:
-
case: "次卡-提交订单-校验接口返回成功case"
case: "次卡-提交订单-同意商家咨询"
phone: "12345678912"
sku_id: "10176"
number: 1
is_doctor_see: 1
gain_coupon_id: 0
deduction_price: 0
assert_error: 0
\ No newline at end of file
assert_error: 0
assert_status: 1
-
case: "次卡-提交订单-不同意商家咨询"
phone: "12345678912"
sku_id: "10176"
number: 1
is_doctor_see: 0
gain_coupon_id: 0
deduction_price: 0
assert_error: 0
assert_status: 1
-
case: "次卡-提交订单-购买数量为2"
phone: "12345678912"
sku_id: "10176"
number: 2
is_doctor_see: 1
gain_coupon_id: 0
deduction_price: 0
assert_error: 0
assert_status: 1
\ No newline at end of file
......@@ -3,7 +3,7 @@ reply_create:
beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel: benzhan
content: ces测试+2021-07-09 17:12:15
content: ces测试+2021-06-28 16:25:25
message: 请勿回复重复内容
message1: 回复成功
message2: 你的回复有点频繁,稍后再来
......
my_diary_v2:
#我的-日记
-
case: "我的页面-日记"
start_num: 0
count: 20
assert: 0
user_tractate:
-
#我的-帖子
case: "我的页面-帖子"
page: 1
count: 10
assert: 0
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