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
b0e88e8d
Commit
b0e88e8d
authored
Jul 09, 2021
by
冯艮霞
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
79afc43c
4678a3c3
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
297 additions
and
4 deletions
+297
-4
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
path_setting.py
path_setting.py
+20
-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
No files found.
all_backend_api/feed_request.py
View file @
b0e88e8d
...
@@ -49,6 +49,27 @@ class feed_request(BaseRequest):
...
@@ -49,6 +49,27 @@ class feed_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"free_recruit_list"
])
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__'
:
if
__name__
==
'__main__'
:
print
(
feed_request
()
.
index_v9
(
"choice"
,
"7.42.2"
,
"beijing"
))
print
(
feed_request
()
.
index_v9
(
"choice"
,
"7.42.2"
,
"beijing"
))
...
@@ -60,4 +81,13 @@ if __name__ == '__main__':
...
@@ -60,4 +81,13 @@ if __name__ == '__main__':
print
(
feed_request
()
.
free_recruit_banner
(
"7.44.1"
,
" "
))
print
(
feed_request
()
.
free_recruit_banner
(
"7.44.1"
,
" "
))
# 免费招募列表
# 免费招募列表
print
(
feed_request
()
.
free_recruit_list
(
"7.44.1"
,
" "
,
"1"
,
"1"
,
"10"
))
print
(
feed_request
()
.
free_recruit_list
(
"7.44.1"
,
" "
,
"1"
,
"1"
,
"10"
))
\ No newline at end of file
# 免费招募活动详情
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 @
b0e88e8d
...
@@ -55,4 +55,37 @@ free_recruit_list:
...
@@ -55,4 +55,37 @@ free_recruit_list:
size
:
${size}
size
:
${size}
data
:
data
:
json
:
{
}
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
isLogin
:
1
\ No newline at end of file
all_backend_api/search_request.py
View file @
b0e88e8d
...
@@ -52,7 +52,11 @@ class search_request(BaseRequest):
...
@@ -52,7 +52,11 @@ class search_request(BaseRequest):
self
.
params
[
"device_id"
]
=
device_id
self
.
params
[
"device_id"
]
=
device_id
return
self
.
api_send
(
self
.
data
[
"hospital"
])
return
self
.
api_send
(
self
.
data
[
"hospital"
])
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
# 打印购物车-猜你喜欢列表接口返回
# 打印购物车-猜你喜欢列表接口返回
print
(
search_request
()
.
hospital
(
82
,
[],
"眼部整形"
,
10
,
"869378034450718"
))
print
(
search_request
()
.
hospital
(
82
,
[],
"眼部整形"
,
10
,
"869378034450718"
))
all_backend_api/search_request.yaml
View file @
b0e88e8d
...
@@ -48,4 +48,5 @@ hospital:
...
@@ -48,4 +48,5 @@ hospital:
count
:
${count}
count
:
${count}
device_id
:
${device_id}
device_id
:
${device_id}
data
:
{}
data
:
{}
json
:
{}
json
:
{}
\ No newline at end of file
all_backend_api/user_request.py
View file @
b0e88e8d
...
@@ -33,6 +33,23 @@ class user_request(BaseRequest):
...
@@ -33,6 +33,23 @@ class user_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"canclefavor"
])
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__'
:
if
__name__
==
'__main__'
:
#个人中心
#个人中心
...
@@ -47,4 +64,9 @@ if __name__ == '__main__':
...
@@ -47,4 +64,9 @@ if __name__ == '__main__':
# print(user_request().topic_canclefavor())
# 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 @
b0e88e8d
...
@@ -38,3 +38,25 @@ canclefavor:
...
@@ -38,3 +38,25 @@ canclefavor:
json
:
{}
json
:
{}
isLogin
:
1
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
path_setting.py
View file @
b0e88e8d
...
@@ -528,5 +528,25 @@ FREE_RECRUIT_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_
...
@@ -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_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"
)
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__'
:
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
print
(
"=========="
,
LIVEYAML_CONFIG
)
test_backend_case/feed_case/test_free_recruit_detail.py
0 → 100644
View file @
b0e88e8d
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 @
b0e88e8d
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 @
b0e88e8d
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 @
b0e88e8d
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 @
b0e88e8d
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 @
b0e88e8d
free_recruit_detail
:
#社区免费招募活动详情
-
case
:
"
招募活动详情图片"
current_city_id
:
"
beijing"
assert
:
null
id
:
43
test_backend_data/feed_data/user_status.yaml
0 → 100644
View file @
b0e88e8d
user_status
:
#免费招募获取用户抽奖状态
-
case
:
"
招募活动获取用户抽奖"
current_city_id
:
"
beijing"
assert
:
true
id
:
43
test_backend_data/feed_data/winning_user_lis.yaml
0 → 100644
View file @
b0e88e8d
winning_user_lis
:
#免费招募活动查看中奖名单
-
case
:
"
招募活动查看中奖名单"
recruit_id
:
"
44"
json
:
assert
:
null
test_backend_data/user_data/my_diary_v2.yaml
0 → 100644
View file @
b0e88e8d
my_diary_v2
:
#我的-日记
-
case
:
"
我的页面-日记"
start_num
:
0
count
:
20
assert
:
0
test_backend_data/user_data/user_tractate.yaml
0 → 100644
View file @
b0e88e8d
user_tractate
:
-
#我的-帖子
case
:
"
我的页面-帖子"
page
:
1
count
:
10
assert
:
0
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