Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
backend_auto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邓莹莹
backend_auto
Commits
77ea1dc9
Commit
77ea1dc9
authored
Jul 09, 2021
by
张慧
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'common_dev' into zhanghui_dev
"合并次卡相关用例完善"
parents
904997f5
b0e88e8d
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
350 additions
and
7 deletions
+350
-7
feed_request.py
all_backend_api/feed_request.py
+32
-2
feed_request.yaml
all_backend_api/feed_request.yaml
+34
-0
search_request.py
all_backend_api/search_request.py
+4
-0
search_request.yaml
all_backend_api/search_request.yaml
+2
-2
user_request.py
all_backend_api/user_request.py
+22
-0
user_request.yaml
all_backend_api/user_request.yaml
+23
-0
web_request.py
all_doctor_api/web_request.py
+6
-2
web_request.yaml
all_doctor_api/web_request.yaml
+9
-0
path_setting.py
path_setting.py
+22
-0
test_free_recruit_detail.py
test_backend_case/feed_case/test_free_recruit_detail.py
+21
-0
test_user_status.py
test_backend_case/feed_case/test_user_status.py
+21
-0
test_winning_user_list.py
test_backend_case/feed_case/test_winning_user_list.py
+21
-0
test_my_diary_v2.py
test_backend_case/user_case/test_my_diary_v2.py
+20
-0
test_user_tractate.py
test_backend_case/user_case/test_user_tractate.py
+19
-0
free_recruit_detail.yaml
test_backend_data/feed_data/free_recruit_detail.yaml
+10
-0
user_status.yaml
test_backend_data/feed_data/user_status.yaml
+10
-0
winning_user_lis.yaml
test_backend_data/feed_data/winning_user_lis.yaml
+10
-0
my_diary_v2.yaml
test_backend_data/user_data/my_diary_v2.yaml
+14
-0
user_tractate.yaml
test_backend_data/user_data/user_tractate.yaml
+14
-0
test_artemis_order_list.py
test_doctor_case/web_case/test_artemis_order_list.py
+2
-0
test_cpc_community_homepage.py
test_doctor_case/web_case/test_cpc_community_homepage.py
+23
-0
artemis_order_list.yaml
test_doctor_data/web_data/artemis_order_list.yaml
+2
-1
cpc_community_homepage.yaml
test_doctor_data/web_data/cpc_community_homepage.yaml
+9
-0
No files found.
all_backend_api/feed_request.py
View file @
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
all_backend_api/feed_request.yaml
View file @
77ea1dc9
...
...
@@ -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
all_backend_api/search_request.py
View file @
77ea1dc9
...
...
@@ -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"
))
all_backend_api/search_request.yaml
View file @
77ea1dc9
...
...
@@ -48,4 +48,5 @@ hospital:
count
:
${count}
device_id
:
${device_id}
data
:
{}
json
:
{}
\ No newline at end of file
json
:
{}
all_backend_api/user_request.py
View file @
77ea1dc9
...
...
@@ -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
))
all_backend_api/user_request.yaml
View file @
77ea1dc9
...
...
@@ -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
all_doctor_api/web_request.py
View file @
77ea1dc9
...
...
@@ -72,6 +72,9 @@ class web_request(BaseRequest):
def
artemis_order_id_detail
(
self
):
"上线中订单详情页"
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"artemis_order_id_detail"
])
def
cpc_community_homepage
(
self
):
"点点通-内容-概览"
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_homepage"
])
...
...
@@ -96,4 +99,5 @@ if __name__ == '__main__':
print
(
web_request
()
.
artemis_order_list
(
0
,
1
))
print
(
web_request
()
.
artemis_order_list
(
1
,
1
))
print
(
web_request
()
.
artemis_order_list
(
2
,
1
))
print
(
web_request
()
.
artemis_order_id_detail
())
\ No newline at end of file
print
(
web_request
()
.
artemis_order_id_detail
())
print
(
web_request
()
.
cpc_community_homepage
())
\ No newline at end of file
all_doctor_api/web_request.yaml
View file @
77ea1dc9
...
...
@@ -153,4 +153,12 @@ artemis_order_id_detail:
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
cpc_community_homepage
:
method
:
get
url
:
/api/web/cpc_community/homepage
params
:
{}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
\ No newline at end of file
path_setting.py
View file @
77ea1dc9
...
...
@@ -435,6 +435,8 @@ VALUEORDERIDDETAIL=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web2_da
ADPACKAGEORDERDETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"artemis_ad_packageorder_detail.yaml"
)
#医生后台-点点通商品-概览
CPCHOMEPAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_homepage.yaml"
)
#医生后台-点点通内容-概览
CPCCOMMUNITYHOMEPAGE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_community_homepage.yaml"
)
#更美次卡橱窗组件商品
VISUAL_BEAUTY_CARD_SERVICES_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"visual_beauty_card.yaml"
)
...
...
@@ -526,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
)
test_backend_case/feed_case/test_free_recruit_detail.py
0 → 100644
View file @
77ea1dc9
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"
]
test_backend_case/feed_case/test_user_status.py
0 → 100644
View file @
77ea1dc9
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"
]
test_backend_case/feed_case/test_winning_user_list.py
0 → 100644
View file @
77ea1dc9
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"
]
test_backend_case/user_case/test_my_diary_v2.py
0 → 100644
View file @
77ea1dc9
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"
]
test_backend_case/user_case/test_user_tractate.py
0 → 100644
View file @
77ea1dc9
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"
]
test_backend_data/feed_data/free_recruit_detail.yaml
0 → 100644
View file @
77ea1dc9
free_recruit_detail
:
#社区免费招募活动详情
-
case
:
"
招募活动详情图片"
current_city_id
:
"
beijing"
assert
:
null
id
:
43
test_backend_data/feed_data/user_status.yaml
0 → 100644
View file @
77ea1dc9
user_status
:
#免费招募获取用户抽奖状态
-
case
:
"
招募活动获取用户抽奖"
current_city_id
:
"
beijing"
assert
:
true
id
:
43
test_backend_data/feed_data/winning_user_lis.yaml
0 → 100644
View file @
77ea1dc9
winning_user_lis
:
#免费招募活动查看中奖名单
-
case
:
"
招募活动查看中奖名单"
recruit_id
:
"
44"
json
:
assert
:
null
test_backend_data/user_data/my_diary_v2.yaml
0 → 100644
View file @
77ea1dc9
my_diary_v2
:
#我的-日记
-
case
:
"
我的页面-日记"
start_num
:
0
count
:
20
assert
:
0
test_backend_data/user_data/user_tractate.yaml
0 → 100644
View file @
77ea1dc9
user_tractate
:
-
#我的-帖子
case
:
"
我的页面-帖子"
page
:
1
count
:
10
assert
:
0
test_doctor_case/web_case/test_artemis_order_list.py
View file @
77ea1dc9
...
...
@@ -18,4 +18,6 @@ class TestArtemisOrderList:
if
r
[
"error"
]
==
0
:
orders
=
r
.
get
(
"data"
)
.
get
(
"orders"
,
[])
assert
len
(
orders
)
>=
param
[
"assert"
]
if
r
[
"error"
]
==
300002
:
assert
r
[
"message"
]
==
param
[
"assert_message"
]
test_doctor_case/web_case/test_cpc_community_homepage.py
0 → 100644
View file @
77ea1dc9
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web_request
import
web_request
class
TestCpcCommunityHomepage
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CPCCOMMUNITYHOMEPAGE
)
cpccommunityhomepage_case
,
cpccommunityhomepage_data
=
get_ids
(
data
,
"cpc_community_homepage"
)
@pytest.mark.parametrize
(
"param"
,
cpccommunityhomepage_data
,
ids
=
cpccommunityhomepage_case
)
def
test_cpc_community_homepage
(
self
,
param
):
'''点点通-概览'''
r
=
web_request
()
.
cpc_community_homepage
()
if
r
[
"error"
]
==
0
:
if
r
[
"data"
][
"account"
]
<=
"0"
:
assert
r
[
"data"
][
"is_cpc"
]
==
param
[
"assert"
]
else
:
assert
r
[
"data"
][
"is_cpc"
]
==
param
[
"assert1"
]
test_doctor_data/web_data/artemis_order_list.yaml
View file @
77ea1dc9
artemis_order_list
:
#我的服务订单case
-
case
:
"
我的服务订单
请求失败
case"
case
:
"
我的服务订单
参数错误
case"
status
:
"
"
page
:
1
assert
:
0
assert_message
:
"
错误参数:
status"
-
case
:
"
我的服务订单-待支付广告包case"
status
:
0
...
...
test_doctor_data/web_data/cpc_community_homepage.yaml
0 → 100644
View file @
77ea1dc9
cpc_community_homepage
:
#点点通内容-概览case
-
case
:
"
点点通内容概览"
#doctor_user_id: "602329"
assert
:
False
assert_account
:
0
assert1
:
True
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment