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
f22e8432
Commit
f22e8432
authored
Jul 30, 2021
by
林颖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日记本查看大图召回美购
parent
c0f0da5d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
72 additions
and
8 deletions
+72
-8
janus_request.py
all_backend_api/janus_request.py
+13
-0
janus_request.yaml
all_backend_api/janus_request.yaml
+17
-2
path_setting.py
path_setting.py
+4
-0
test_update.py
test_backend_case/diary_case/test_update.py
+0
-5
test_sales_lead_spu_by_diary.py
test_backend_case/janus_case/test_sales_lead_spu_by_diary.py
+22
-0
sales_lead_spu_by_diary.yaml
test_backend_data/janus_data/sales_lead_spu_by_diary.yaml
+15
-0
topic_reply_create.yaml
test_backend_data/topic_data/topic_reply_create.yaml
+1
-1
No files found.
all_backend_api/janus_request.py
View file @
f22e8432
...
...
@@ -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 @
f22e8432
...
...
@@ -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
path_setting.py
View file @
f22e8432
...
...
@@ -38,6 +38,10 @@ QUERY_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "query_req
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"
)
...
...
test_backend_case/diary_case/test_update.py
View file @
f22e8432
...
...
@@ -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/janus_case/test_sales_lead_spu_by_diary.py
0 → 100644
View file @
f22e8432
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_data/janus_data/sales_lead_spu_by_diary.yaml
0 → 100644
View file @
f22e8432
# 日记本大图关联美购--其实和日记本关联的美购一致
# 用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/topic_data/topic_reply_create.yaml
View file @
f22e8432
...
...
@@ -3,7 +3,7 @@ reply_create:
beuzhu
:
'
#
备注:
这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case
:
日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel
:
benzhan
content
:
ces测试+2021-07-2
8 19:16:19
content
:
ces测试+2021-07-2
9 17:18:00
message
:
请勿回复重复内容
message1
:
回复成功
message2
:
你的回复有点频繁,稍后再来
...
...
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