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
0aae8b30
Commit
0aae8b30
authored
Jul 30, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'common_dev' into zzsq_dev
parents
15261c6c
c5603cc1
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
580 additions
and
18 deletions
+580
-18
diary_request.py
all_backend_api/diary_request.py
+8
-0
diary_request.yaml
all_backend_api/diary_request.yaml
+22
-0
janus_live_request.py
all_backend_api/janus_live_request.py
+25
-2
janus_live_request.yaml
all_backend_api/janus_live_request.yaml
+33
-0
janus_request.py
all_backend_api/janus_request.py
+13
-0
janus_request.yaml
all_backend_api/janus_request.yaml
+17
-2
query_request.py
all_backend_api/query_request.py
+13
-0
query_request.yaml
all_backend_api/query_request.yaml
+11
-0
achelous_request.py
all_om_api/achelous_request.py
+21
-0
achelous_request.yaml
all_om_api/achelous_request.yaml
+20
-0
path_setting.py
path_setting.py
+26
-2
test_update.py
test_backend_case/diary_case/test_update.py
+0
-5
test_vote.py
test_backend_case/diary_case/test_vote.py
+37
-0
test_api_topic_vote.py
test_backend_case/hybrid_case/test_api_topic_vote.py
+1
-1
test_sales_lead_spu_by_diary.py
test_backend_case/janus_case/test_sales_lead_spu_by_diary.py
+22
-0
test_service_page_live_enter.py
test_backend_case/janus_case/test_service_page_live_enter.py
+15
-0
test_audience_services.py
test_backend_case/janus_live_case/test_audience_services.py
+15
-0
test_pop_service.py
test_backend_case/janus_live_case/test_pop_service.py
+22
-0
__init__.py
test_backend_case/query_case/__init__.py
+0
-0
test_preset_words.py
test_backend_case/query_case/test_preset_words.py
+34
-0
vote.yaml
test_backend_data/diary_data/vote.yaml
+15
-0
api_topic_vote.yaml
test_backend_data/hybrid_data/api_topic_vote.yaml
+1
-1
hospital_search.yaml
test_backend_data/janus_data/hospital_search.yaml
+5
-4
sales_lead_spu_by_diary.yaml
test_backend_data/janus_data/sales_lead_spu_by_diary.yaml
+15
-0
audience_services.yaml
test_backend_data/janus_live_data/audience_services.yaml
+19
-0
pop_service.yaml
test_backend_data/janus_live_data/pop_service.yaml
+10
-0
service_page_live_enter.yaml
...backend_data/janus_live_data/service_page_live_enter.yaml
+7
-0
__init__.py
test_backend_data/query_data/__init__.py
+0
-0
preset_words.yaml
test_backend_data/query_data/preset_words.yaml
+107
-0
topic_reply_create.yaml
test_backend_data/topic_data/topic_reply_create.yaml
+1
-1
__init__.py
test_om_case/achelous_case/__init__.py
+0
-0
test_batch_add_service.py
test_om_case/achelous_case/test_batch_add_service.py
+20
-0
__init__.py
test_om_data/achelous_data/__init__.py
+0
-0
batch_add_service.yaml
test_om_data/achelous_data/batch_add_service.yaml
+25
-0
No files found.
all_backend_api/diary_request.py
View file @
0aae8b30
...
...
@@ -47,4 +47,12 @@ class diary_request(BaseRequest):
self
.
params
[
"topic_list"
]
=
topic_list
return
self
.
api_send
(
self
.
data
[
"update"
])
# 日记本卡片点赞
def
diary_vote
(
self
,
diary_id
):
self
.
params
[
"diary_id"
]
=
diary_id
return
self
.
api_send
(
self
.
data
[
"vote"
])
# 日记本卡片取消点赞
def
diary_cancel_vote
(
self
,
diary_id
):
self
.
params
[
"diary_id"
]
=
diary_id
return
self
.
api_send
(
self
.
data
[
"cancel_vote"
])
all_backend_api/diary_request.yaml
View file @
0aae8b30
...
...
@@ -78,3 +78,25 @@ update:
topic_list
:
${topic_list}
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#日记本卡片的点赞
vote
:
method
:
post
url
:
/api/diary/vote
params
:
data
:
diary_id
:
${diary_id}
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
#日记本卡片的取消点赞
cancel_vote
:
method
:
post
url
:
/api/diary/cancel_vote
params
:
data
:
diary_id
:
${diary_id}
json
:
{}
isLogin
:
1
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
all_backend_api/janus_live_request.py
View file @
0aae8b30
...
...
@@ -8,6 +8,7 @@ class live_request(BaseRequest):
self
.
data
=
self
.
api_load
(
path_setting
.
LIVEGIFTS_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
SEARCHSERVICE_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
ADDLIVESERVICE_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
POP_SERVICE_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
DELETELIVESERVICE_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
DELETEGIFT_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
M_GET_CHANNEL_STATUS_CONFIG
)
...
...
@@ -59,6 +60,14 @@ class live_request(BaseRequest):
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"add_live_service"
])
#主播-添加商品后,购物车上方弹出商品卡片
def
pop_service
(
self
,
stream_id
,
live_service_id
,
pop_type
,
version
,
device_id
=
'97B6764B-2135-4761-9911-701C38CBC272'
):
self
.
params
[
"stream_id"
]
=
stream_id
self
.
params
[
"live_service_id"
]
=
live_service_id
self
.
params
[
"pop_type"
]
=
pop_type
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"pop_service"
])
#主播-推荐袋删除商品
def
delete_live_service
(
self
,
channel_id
,
live_service_id
,
version
,
device_id
=
'97B6764B-2135-4761-9911-701C38CBC272'
):
self
.
params
[
"channel_id"
]
=
channel_id
...
...
@@ -90,10 +99,24 @@ class live_request(BaseRequest):
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"mark_live_service"
])
#直播-观众打开购物袋
def
audience_services
(
self
,
stream_id
,
channel_id
,
offset
,
size
):
self
.
params
[
"stream_id"
]
=
stream_id
self
.
params
[
"channel_id"
]
=
channel_id
self
.
params
[
"offset"
]
=
offset
self
.
params
[
"size"
]
=
size
return
self
.
api_send
(
self
.
data
[
"audience_services"
])
#观众点击直播内美购跳转详情页
def
service_page_live_enter
(
self
,
service_id
):
self
.
params
[
"service_id"
]
=
service_id
return
self
.
api_send
(
self
.
data
[
"service_page_live_enter"
])
if
__name__
==
'__main__'
:
# print(live_request().live_services("745", "4177", "0", "10"))
# print(live_request().search_service("beijing", "745", "", "0", "20", "7.45.0"))
# print(live_request().add_live_service("745", "560641", "7.45.0"))
# print(live_request().delete_live_service("745", "7242", "7.45.0"))
#print(live_request().m_get_channel_status("745", "7.46.0"))
print
(
live_request
()
.
mark_live_service
(
"4233"
,
"745"
,
"7269"
,
"1"
,
"746.0"
))
\ No newline at end of file
# print(live_request().mark_live_service("4233", "745", "7269", "1", "746.0"))
# print(live_request().audience_services("4179","739","0","20"))
print
(
live_request
()
.
pop_service
(
"4266"
,
"7324"
,
"1"
,
"746.0"
))
\ No newline at end of file
all_backend_api/janus_live_request.yaml
View file @
0aae8b30
...
...
@@ -52,6 +52,19 @@ add_live_service:
json
:
{}
isLogin
:
1
#主播-添加商品后,购物车上方弹出商品卡片
pop_service
:
method
:
GET
url
:
/api/janus/live/pop_service
params
:
stream_id
:
${stream_id}
live_service_id
:
${live_service_id}
pop_type
:
${pop_type}
version
:
${version}
data
:
{}
json
:
{
}
isLogin
:
1
#主播-推荐袋删除商品
delete_live_service
:
method
:
POST
...
...
@@ -103,4 +116,23 @@ mark_live_service:
json
:
{}
isLogin
:
1
#直播-观众打开购物袋
audience_services
:
method
:
get
url
:
/api/janus/live/audience_services
params
:
stream_id
:
${stream_id}
channel_id
:
${channel_id}
offset
:
${offset}
size
:
${size}
data
:
{}
json
:
{}
#观众点击直播内美购
service_page_live_enter
:
method
:
get
url
:
/api/janus/live/service_page_live_enter
params
:
service_id
:
${service_id}
data
:
{}
json
:
{}
\ No newline at end of file
all_backend_api/janus_request.py
View file @
0aae8b30
...
...
@@ -248,6 +248,19 @@ class janus_request(BaseRequest):
self
.
params
[
"rosy"
]
=
rosy
return
self
.
api_send
(
self
.
data
[
"beauty_post"
])
# 日记点击大图--关联美购--除了id外其余用默认参数代替
def
sales_lead_spu_by_diary
(
self
,
diary_id
,
current_city_id
=
'beijing'
,
device_id
=
'91B499C2-1CA2-4CB2-F118-658C87BC1795'
,
lat
=
'39.98318403526738'
,
lng
=
'116.4880823948151'
):
self
.
params
[
"diary_id"
]
=
diary_id
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"device_id"
]
=
device_id
self
.
params
[
"lat"
]
=
lat
self
.
params
[
"lng"
]
=
lng
return
self
.
api_send
(
self
.
data
[
"sales_lead_spu_by_diary"
])
#
if
__name__
==
'__main__'
:
...
...
all_backend_api/janus_request.yaml
View file @
0aae8b30
...
...
@@ -340,4 +340,19 @@ beauty_post:
white
:
${white}
rosy
:
${rosy}
json
:
{}
isLogin
:
1
\ No newline at end of file
isLogin
:
1
#日记点击大图--关联美购--除了id外其余用默认参数代替
sales_lead_spu_by_diary
:
method
:
get
url
:
/api/janus/sales_lead/spu_by_diary
params
:
diary_id
:
${diary_id}
current_city_id
:
${current_city_id}
device_id
:
${device_id}
lat
:
${lat}
lng
:
${lng}
data
:
{}
json
:
{}
isLogin
:
0
\ No newline at end of file
all_backend_api/query_request.py
0 → 100644
View file @
0aae8b30
import
path_setting
from
in_common.base_request
import
BaseRequest
class
query_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
QUERY_CONFIG
)
# 详情页预置词
def
preset_words
(
self
,
id
,
type
):
self
.
params
[
"id"
]
=
id
self
.
params
[
"type"
]
=
type
return
self
.
api_send
(
self
.
data
[
"preset_words"
])
all_backend_api/query_request.yaml
0 → 100644
View file @
0aae8b30
#详情页预置词
preset_words
:
method
:
get
url
:
/api/query/preset_words
params
:
id
:
${id}
type
:
${type}
data
:
json
:
{}
isLogin
:
0
#需要登录添加这个字段,值为1 0是不需要登录的情况,如不需要登录,可以不添加这个字段
all_om_api/achelous_request.py
0 → 100644
View file @
0aae8b30
import
path_setting
from
in_common.base_request
import
BaseRequest
class
achelous_request
(
BaseRequest
):
def
__init__
(
self
):
self
.
data
=
self
.
api_load
(
path_setting
.
ACHELOUS_REQUEST_CONFIG
)
def
batch_add_service
(
self
,
stream_id
,
service_item_ids
):
self
.
params
[
"stream_id"
]
=
stream_id
self
.
params
[
"service_item_ids"
]
=
service_item_ids
return
self
.
api_send
(
self
.
data
[
"batch_add_service"
])
#def batch_del_service(self, stream_id, service_item_ids):
# self.params["stream_id"] = stream_id
# self.params["service_item_ids"] = service_item_ids
# return self.api_send(self.data["batch_add_service"])
if
__name__
==
"__main__"
:
print
(
achelous_request
()
.
batch_add_service
(
"4176"
,
"73809,23508,33823"
))
# print(achelous_request().batch_del_service("4176","7312,7311"))
\ No newline at end of file
all_om_api/achelous_request.yaml
0 → 100644
View file @
0aae8b30
batch_add_service
:
method
:
post
url
:
/achelous/live/batch_add_service
params
:
{}
data
:
stream_id
:
${stream_id}
service_item_ids
:
${service_item_ids}
json
:
{}
isLogin
:
1
#batch_del_service:
# method: post
#url: /achelous/live/batch_del_service
#params: {}
#data:
# stream_id: ${stream_id}
#service_item_ids: ${service_item_ids}
#json: {}
#isLogin: 1
\ No newline at end of file
path_setting.py
View file @
0aae8b30
...
...
@@ -22,6 +22,8 @@ DIARY_FAVOR = os.path.join(BASE_DIR, "backend_auto/test_backend_data/diary_data"
DIARY_OPERATION
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"diary_operation.yaml"
)
# 日记本创建日记贴信息-
DIARY_UPDATE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"diary_update.yaml"
)
# 日记本点赞&取消点赞
DIARY_VOTE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/diary_data"
,
"vote.yaml"
)
# 日记本创建添加医院-- auto_complete 总配置项
...
...
@@ -31,6 +33,15 @@ AUTO_COMPLE_HOSPITAL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/au
AUTO_COMPLE_DOCTOR
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/auto_complete_data"
,
"doctor.yaml"
)
# 详情页搜索预置词--query 总配置项
QUERY_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"query_request.yaml"
)
QUERY_PRESET_WORDS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/query_data"
,
"preset_words.yaml"
)
# 日记大图召回美购
SPU_BY_DIARY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"sales_lead_spu_by_diary.yaml"
)
# 日记本进入相册页
DIARY_ALBUM_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"hybrid_diary_request.yaml"
)
DIARY_ALBUM
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_data"
,
"diary_album.yaml"
)
...
...
@@ -38,7 +49,7 @@ DIARY_ALBUM = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hybrid_data
# 日记本列表-日记贴点赞相关()
DIARY_VOTE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"hybrid_api_topic_request.yaml"
)
DIARY_VOTE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_data"
,
"api_topic_vote.yaml"
)
DIARY_
TOPIC_
VOTE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/hybrid_data"
,
"api_topic_vote.yaml"
)
# 日记本&帖子&日记贴&帖子&问答各个详情页下方推荐内容
...
...
@@ -546,6 +557,10 @@ CHECK_SKU_IDS = os.path.join(BASE_DIR, "backend_auto/test_om_data/beautycard_dat
CHECK_SPU_IDS_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_om_api"
,
"beautycard_request.yaml"
)
CHECK_SPU_IDS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_om_data/beautycard_data"
,
"check_spu_ids.yaml"
)
#om-achelous
ACHELOUS_REQUEST_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_om_api"
,
"achelous_request.yaml"
)
#直播-om后台-批量添加美购
BATCH_ADD_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_om_data/achelous_data"
,
"batch_add_service.yaml"
)
#次卡商详页
BEAUTY_CARD_DETAIL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_data"
,
"beauty_card_detail.yaml"
)
...
...
@@ -600,6 +615,10 @@ SEARCHGIFTS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_live_
ADDLIVESERVICE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_live_request.yaml"
)
ADDLIVESERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_live_data"
,
"add_live_service.yaml"
)
#主播-添加商品后,购物车上方弹出商品卡片
POP_SERVICE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_live_request.yaml"
)
POP_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_live_data"
,
"pop_service.yaml"
)
#主播-推荐袋删除商品
DELETELIVESERVICE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_live_request.yaml"
)
DELETELIVESERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_live_data"
,
"delete_live_service.yaml"
)
...
...
@@ -627,6 +646,10 @@ FINISH = os.path.join(BASE_DIR, "backend_auto/test_backend_data/live_data", "fin
#主播标记讲解商品+取消标记
MARK_LIVE_SERVICE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"janus_live_request.yaml"
)
MARK_LIVE_SERVICE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_live_data"
,
"mark_live_service.yaml"
)
#直播-观众打开购物袋
AUDIENCE_SERVICES
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_live_data"
,
"audience_services.yaml"
)
#直播-用户点击直播间美购
SERVICE_PAGE_LIVE_ENTER
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/janus_live_data"
,
"service_page_live_enter.yaml"
)
#主播-分享按钮的点击
GET_LIVE_INFO_AUDIENCE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"live_request.yaml"
)
...
...
@@ -681,4 +704,4 @@ FAVORS_TOPICS = os.path.join(BASE_DIR, "backend_auto/test_backend_data/user_data
TAG_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"tag_request.yaml"
)
TAG_ADD
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/tag_data"
,
"tag_add.yaml"
)
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
print
(
"=========="
,
LIVEYAML_CONFIG
)
\ No newline at end of file
test_backend_case/diary_case/test_update.py
View file @
0aae8b30
...
...
@@ -13,15 +13,10 @@ class TestDiaryUpdate:
@pytest.mark.parametrize
(
"param"
,
diary_update_data
,
ids
=
diary_update_case
)
def
test_diary_update
(
self
,
param
):
r
=
diary_request
()
.
diary_update
(
param
[
"topic_list"
])
# print(r)
# if r["error"] == 0:
# assert r["message"] == param["assert"]
if
r
[
"error"
]
==
1
:
assert
r
[
"message"
]
==
param
[
"message"
]
# 校验--如果是因为发布频繁导致的错误就不用理会-如果是其他再判断
# 收藏之后取消收藏?为啥能成功?
...
...
test_backend_case/diary_case/test_vote.py
0 → 100644
View file @
0aae8b30
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.diary_request
import
diary_request
class
TestVote
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DIARY_VOTE
)
diary_vote_case
,
diary_vote_data
=
get_ids
(
data
,
"diary_vote"
)
@pytest.mark.parametrize
(
"param"
,
diary_vote_data
,
ids
=
diary_vote_case
)
def
test_vote
(
self
,
param
):
r
=
diary_request
()
.
diary_vote
(
param
[
"diary_id"
])
# 如果点赞成功,就走取消点赞的流程,否则先取消点赞再去点赞
if
r
[
"message"
]
==
param
[
"assert2"
]:
# 之后取消点赞。【最后保持取消点赞的状态】
cancel_vote
=
diary_request
()
.
diary_cancel_vote
(
param
[
"diary_id"
])
assert
cancel_vote
[
"error"
]
==
0
else
:
# 如果是已经点过赞的状态就直接取消点赞,然后再走一遍点赞-取消点赞;一般不走这边除非手动点过这个卡片
assert
r
[
"message"
]
==
param
[
"assert3"
]
cancel_vote
=
diary_request
()
.
diary_cancel_vote
(
param
[
"diary_id"
])
assert
cancel_vote
[
"error"
]
==
0
vote
=
diary_request
()
.
diary_vote
(
param
[
"diary_id"
])
assert
vote
[
"message"
]
==
param
[
"assert2"
]
cancel_vote
=
diary_request
()
.
diary_cancel_vote
(
param
[
"diary_id"
])
assert
cancel_vote
[
"error"
]
==
0
test_backend_case/hybrid_case/test_api_topic_vote.py
View file @
0aae8b30
...
...
@@ -7,7 +7,7 @@ from all_backend_api.hybrid_api_topic_request import hybrid_api_topic_request
class
TestDiaryVote
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DIARY_VOTE
)
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DIARY_
TOPIC_
VOTE
)
diary_vote_case
,
diary_vote_data
=
get_ids
(
data
,
"diary_vote"
)
@pytest.mark.parametrize
(
"param"
,
diary_vote_data
,
ids
=
diary_vote_case
)
...
...
test_backend_case/janus_case/test_sales_lead_spu_by_diary.py
0 → 100644
View file @
0aae8b30
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
all_backend_api.janus_request
import
janus_request
from
in_common.base_request
import
BaseRequest
class
TestSalesLeadSpuByDiary
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
SPU_BY_DIARY
)
sales_lead_spu_by_diary_case
,
sales_lead_spu_by_diary_data
=
get_ids
(
data
,
"sales_lead_spu_by_diary"
)
@pytest.mark.parametrize
(
"param"
,
sales_lead_spu_by_diary_data
,
ids
=
sales_lead_spu_by_diary_case
)
def
test_sales_lead_spu_by_diary
(
self
,
param
):
r
=
janus_request
()
.
sales_lead_spu_by_diary
(
param
[
"diary_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
if
param
[
"spu_info"
]
==
1
:
assert
r
[
"data"
][
"spu_info"
]
else
:
assert
r
[
"data"
][
"spu_info"
]
is
None
test_backend_case/janus_case/test_service_page_live_enter.py
0 → 100644
View file @
0aae8b30
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
all_backend_api.janus_live_request
import
live_request
from
in_common.base_request
import
BaseRequest
class
TestServicePageLiveEnter
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
SERVICE_PAGE_LIVE_ENTER
)
service_page_live_enter_case
,
service_page_live_enter_data
=
get_ids
(
data
,
"service_page_live_enter"
)
@pytest.mark.parametrize
(
"param"
,
service_page_live_enter_data
,
ids
=
service_page_live_enter_case
)
def
test_service_page_live_enter
(
self
,
param
):
r
=
live_request
()
.
service_page_live_enter
(
param
[
"service_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
test_backend_case/janus_live_case/test_audience_services.py
0 → 100644
View file @
0aae8b30
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.janus_live_request
import
live_request
class
TestAudienceServices
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
AUDIENCE_SERVICES
)
audience_services_case
,
audience_services_data
=
get_ids
(
data
,
"audience_services"
)
@pytest.mark.parametrize
(
"param"
,
audience_services_data
,
ids
=
audience_services_case
)
def
test_audience_services
(
self
,
param
):
r
=
live_request
()
.
audience_services
(
param
[
"stream_id"
],
param
[
"channel_id"
],
param
[
"offset"
],
param
[
"size"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_case/janus_live_case/test_pop_service.py
0 → 100644
View file @
0aae8b30
import
pytest
import
path_setting
from
all_backend_api.janus_live_request
import
live_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestPopService
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
POP_SERVICE
)
pop_service_case
,
pop_service_data
=
get_ids
(
data
,
"pop_service"
)
@pytest.mark.parametrize
(
"param"
,
pop_service_data
,
ids
=
pop_service_case
)
def
test_pop_service
(
self
,
param
):
r
=
live_request
()
.
pop_service
(
param
[
"stream_id"
],
param
[
"live_service_id"
],
param
[
"pop_type"
],
param
[
"version"
])
if
r
[
"error"
]
==
0
:
print
(
"成功弹出商品卡片"
)
assert
r
[
"data"
][
"live_service_id"
]
==
param
[
"assert"
]
else
:
print
(
"出错了!!!"
)
\ No newline at end of file
test_backend_case/query_case/__init__.py
0 → 100644
View file @
0aae8b30
test_backend_case/query_case/test_preset_words.py
0 → 100644
View file @
0aae8b30
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_backend_api.query_request
import
query_request
class
TestPresetWords
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
QUERY_PRESET_WORDS
)
preset_words_case
,
preset_words_data
=
get_ids
(
data
,
"preset_words"
)
@pytest.mark.parametrize
(
"param"
,
preset_words_data
,
ids
=
preset_words_case
)
def
test_PresetWords
(
self
,
param
):
r
=
query_request
()
.
preset_words
(
param
[
"id"
],
param
[
"type"
])
# 因问答详情页接口返回不一样所以加了个标示位
key
=
"is_question_answer"
if
param
[
"is_preset_words"
]
==
1
:
assert
len
(
r
[
"data"
][
"tags"
])
==
param
[
"len"
]
else
:
if
key
in
param
.
keys
():
assert
len
(
r
[
"data"
][
"tags"
])
==
param
[
"len"
]
else
:
assert
len
(
r
[
"data"
])
==
param
[
"len"
]
test_backend_data/diary_data/vote.yaml
0 → 100644
View file @
0aae8b30
diary_vote
:
#点赞case--从日记本卡片对日记本点赞
-
case
:
"
日记本卡片点赞日记本--点赞&取消点赞成功case--校验"
diary_id
:
17586091
assert1
:
assert2
:
"
美
+1"
assert3
:
"
已经赞过啦"
test_backend_data/hybrid_data/api_topic_vote.yaml
View file @
0aae8b30
diary_vote
:
#点赞case--从日记本列表点赞
-
case
:
"
日记本列表点赞--点赞&取消点赞成功case--校验"
case
:
"
日记本列表点赞
日记贴
--点赞&取消点赞成功case--校验"
id
:
21249958
topic_id
:
21249958
assert1
:
0
...
...
test_backend_data/janus_data/hospital_search.yaml
View file @
0aae8b30
hospital_search
:
#北京画美医院主页
-
#医院主页搜索---搜索成功,有数据召回
case
:
"
医院主页搜索---搜索成功,当前搜索词召回的对应商品不少于5个,不展示热卖推荐商品"
query
:
"
玻尿酸"
device_id
:
"
1321222222222222135"
hospital_id
:
"
96ea37eef81d11e692f800163e000a4a
"
hospital_id
:
"
fb38be6e52b34b6d8efe7a30d2c93022
"
current_city_id
:
"
beijing"
version
:
"
742.2"
offset
:
"
0"
size
:
"
10"
assert1
:
0
assert1
:
5
assert2
:
0
-
...
...
@@ -17,7 +18,7 @@ hospital_search:
case
:
"
医院主页搜索---搜索成功,当前搜索词下无对应商品,召回热卖推荐商品"
query
:
"
美白针"
device_id
:
"
1321222222222222135"
hospital_id
:
"
96ea37eef81d11e692f800163e000a4a
"
hospital_id
:
"
fb38be6e52b34b6d8efe7a30d2c93022
"
current_city_id
:
"
beijing"
version
:
"
742.2"
offset
:
"
0"
...
...
@@ -30,7 +31,7 @@ hospital_search:
case
:
"
医院主页搜索---搜索成功,当前搜索词召回的对应商品少于5个,展示热卖推荐商品"
query
:
"
瘦脸针"
device_id
:
"
1321222222222222135"
hospital_id
:
"
96ea37eef81d11e692f800163e000a4a
"
hospital_id
:
"
fb38be6e52b34b6d8efe7a30d2c93022
"
current_city_id
:
"
beijing"
version
:
"
742.2"
offset
:
"
0"
...
...
test_backend_data/janus_data/sales_lead_spu_by_diary.yaml
0 → 100644
View file @
0aae8b30
# 日记本大图关联美购--其实和日记本关联的美购一致
# 用spu_info来作为标示位
# id 是必传项
sales_lead_spu_by_diary
:
-
case
:
"
日记本大图关联美购--存在美购"
diary_id
:
15261339
spu_info
:
1
assert
:
0
-
case
:
"
日记本大图关联美购--不存在美购"
diary_id
:
17586195
spu_info
:
null
assert
:
0
\ No newline at end of file
test_backend_data/janus_live_data/audience_services.yaml
0 → 100644
View file @
0aae8b30
audience_services
:
-
case
:
"
直播-观众打开购物袋"
url
:
/api/janus/live/audience_services
stream_id
:
4116
channel_id
:
739
offset
:
0
size
:
20
assert
:
0
-
case
:
"
直播-购物袋第二页"
url
:
/api/janus/live/audience_services
stream_id
:
4116
channel_id
:
739
offset
:
20
size
:
20
assert
:
0
\ No newline at end of file
test_backend_data/janus_live_data/pop_service.yaml
0 → 100644
View file @
0aae8b30
pop_service
:
#主播添加商品后,购物车上方成功弹出一个商品卡片
-
case
:
"
主播添加商品后,购物车上方成功弹出一个商品卡片"
stream_id
:
"
4266"
live_service_id
:
"
7324"
pop_type
:
"
1"
version
:
"
7.46.0"
assert
:
7324
\ No newline at end of file
test_backend_data/janus_live_data/service_page_live_enter.yaml
0 → 100644
View file @
0aae8b30
service_page_live_enter
:
-
case
:
"
用户点击直播间商品卡片"
url
:
/api/janus/live/audience_services
service_id
:
"
5885090"
assert
:
0
\ No newline at end of file
test_backend_data/query_data/__init__.py
0 → 100644
View file @
0aae8b30
test_backend_data/query_data/preset_words.yaml
0 → 100644
View file @
0aae8b30
preset_words
:
#详情页预置词
#is_preset_words 用来case判断有没有预置词,因为两个的判定条件不一样,这样写简单点
# is_question_answer 问答详情页的单独标示位
-
case
:
"
不存在预置词--日记本详情页--校验"
id
:
17586091
type
:
1
len
:
0
is_preset_words
:
0
-
case
:
"
存在一个预置词--日记本详情页--校验"
id
:
15714021
type
:
1
len
:
1
is_preset_words
:
1
-
case
:
"
存在两个预置词--日记本详情页--校验"
id
:
17004877
type
:
1
len
:
2
is_preset_words
:
1
-
case
:
"
不存在预置词--日记贴详情页--校验"
id
:
123456954
type
:
2
len
:
0
is_preset_words
:
0
-
case
:
"
存在一个预置词--日记贴详情页--校验"
id
:
21129553
type
:
2
len
:
1
is_preset_words
:
1
-
case
:
"
存在两个预置词--日记贴详情页--校验"
id
:
21149097
type
:
2
len
:
2
is_preset_words
:
1
-
case
:
"
不存在预置词--问答详情页--校验---单独校验这个返回方式和别的不一样"
id
:
357125
type
:
3
len
:
0
is_preset_words
:
0
is_question_answer
:
1
-
case
:
"
存在一个预置词--问答详情页--校验"
id
:
181212
type
:
3
len
:
1
is_preset_words
:
1
-
case
:
"
存在两个预置词--问答详情页--校验"
id
:
124225
type
:
3
len
:
2
is_preset_words
:
1
-
case
:
"
不存在预置词--回答详情页--校验"
id
:
1008579
type
:
4
len
:
0
is_preset_words
:
0
-
case
:
"
存在一个预置词--回答详情页--校验"
id
:
246245
type
:
4
len
:
1
is_preset_words
:
1
-
case
:
"
存在两个预置词--回答详情页--校验"
id
:
867689
type
:
4
len
:
2
is_preset_words
:
1
-
case
:
"
不存在预置词--帖子详情页--校验"
id
:
187937
type
:
5
len
:
0
is_preset_words
:
0
-
case
:
"
存在一个预置词--帖子详情页--校验"
id
:
44534
type
:
5
len
:
1
is_preset_words
:
1
-
case
:
"
存在两个预置词--帖子详情页--校验"
id
:
172774
type
:
5
len
:
2
is_preset_words
:
1
test_backend_data/topic_data/topic_reply_create.yaml
View file @
0aae8b30
...
...
@@ -3,7 +3,7 @@ reply_create:
beuzhu
:
'
#
备注:
这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case
:
日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel
:
benzhan
content
:
ces测试+2021-07-2
2 18:42:5
9
content
:
ces测试+2021-07-2
8 19:16:1
9
message
:
请勿回复重复内容
message1
:
回复成功
message2
:
你的回复有点频繁,稍后再来
...
...
test_om_case/achelous_case/__init__.py
0 → 100644
View file @
0aae8b30
test_om_case/achelous_case/test_batch_add_service.py
0 → 100644
View file @
0aae8b30
import
pytest
import
path_setting
from
all_om_api.achelous_request
import
achelous_request
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
class
TestBatchAddService
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
BATCH_ADD_SERVICE
)
batch_add_service_case
,
batch_add_service_data
=
get_ids
(
data
,
"batch_add_service"
)
@pytest.mark.parametrize
(
"param"
,
batch_add_service_data
,
ids
=
batch_add_service_case
)
def
test_batch_add_service
(
self
,
param
):
r
=
achelous_request
()
.
batch_add_service
(
param
[
'stream_id'
],
param
[
'service_item_ids'
])
#print(type(r["failed_service_item_ids"]))
if
r
.
get
(
"code"
)
==
1
:
assert
r
[
'message'
]
==
param
[
"assert"
]
elif
len
(
r
[
"failed_service_item_ids"
])
==
0
:
assert
r
[
"success_service_item_ids"
]
==
param
[
"assert2"
]
elif
r
[
"success_service_item_ids"
]
==
0
:
assert
r
[
"success_service_item_ids"
]
==
param
[
"assert1"
]
test_om_data/achelous_data/__init__.py
0 → 100644
View file @
0aae8b30
test_om_data/achelous_data/batch_add_service.yaml
0 → 100644
View file @
0aae8b30
batch_add_service
:
-
case
:
"
om-直播-批量添加一件美购"
stream_id
:
"
4166"
service_item_ids
:
"
73809"
assert2
:
[
73809
]
-
case
:
"
om-直播-批量添加多件美购"
stream_id
:
"
4166"
service_item_ids
:
"
23508,33823"
assert2
:
[
33823
,
23508
]
-
case
:
"
om-直播添加商品-输入不合法符号"
stream_id
:
"
4166"
service_item_ids
:
"
73809,23508,33823"
assert
:
"
请输入合法的SKU
ID以,隔开"
-
case
:
"
om-直播-添加错误美购id"
stream_id
:
"
4166"
service_item_ids
:
"
235"
assert1
:
'
[235]'
\ 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