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
df80bd32
Commit
df80bd32
authored
Jul 16, 2021
by
张伟男
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'common_dev' into zwn_dev
parents
b47b8e4a
cf518550
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
245 additions
and
6 deletions
+245
-6
user_request.py
all_backend_api/user_request.py
+44
-2
user_request.yaml
all_backend_api/user_request.yaml
+39
-1
web_request.py
all_doctor_api/web_request.py
+6
-0
web_request.yaml
all_doctor_api/web_request.yaml
+9
-0
path_setting.py
path_setting.py
+14
-1
test_favors_services.py
test_backend_case/user_case/test_favors_services.py
+18
-0
test_my_question.py
test_backend_case/user_case/test_my_question.py
+18
-0
test_reply_tractate.py
test_backend_case/user_case/test_reply_tractate.py
+18
-0
favors_services.yaml
test_backend_data/user_data/favors_services.yaml
+19
-0
my_question.yaml
test_backend_data/user_data/my_question.yaml
+14
-0
reply_tractate.yaml
test_backend_data/user_data/reply_tractate.yaml
+15
-0
user_tractate.yaml
test_backend_data/user_data/user_tractate.yaml
+2
-2
test_cpc_community_click_logs.py
test_doctor_case/web_case/test_cpc_community_click_logs.py
+23
-0
cpc_community_click_logs.yaml
test_doctor_data/web_data/cpc_community_click_logs.yaml
+6
-0
No files found.
all_backend_api/user_request.py
View file @
df80bd32
...
@@ -52,9 +52,10 @@ class user_request(BaseRequest):
...
@@ -52,9 +52,10 @@ class user_request(BaseRequest):
self
.
params
[
"count"
]
=
count
self
.
params
[
"count"
]
=
count
return
self
.
api_send
(
self
.
data
[
"my_diary_v2"
])
return
self
.
api_send
(
self
.
data
[
"my_diary_v2"
])
# 我的-
日记
# 我的-
帖子-我发布的
def
user_tractate
(
self
,
page
,
count
):
def
user_tractate
(
self
,
page
,
count
):
self
.
params
[
"page"
]
=
page
self
.
params
[
"page"
]
=
page
...
@@ -63,6 +64,38 @@ class user_request(BaseRequest):
...
@@ -63,6 +64,38 @@ class user_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
"user_tractate"
])
return
self
.
api_send
(
self
.
data
[
"user_tractate"
])
# 我的-帖子-我回复的
def
reply_tractate
(
self
,
page
,
count
,
version
):
self
.
params
[
"page"
]
=
page
self
.
params
[
"count"
]
=
count
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"reply_tractate"
])
# 我的-问题
def
my_question
(
self
,
start_num
,
count
):
self
.
params
[
"start_num"
]
=
start_num
self
.
params
[
"count"
]
=
count
return
self
.
api_send
(
self
.
data
[
"my_question"
])
# 我的-收藏
def
favors_services
(
self
,
start_num
,
count
,
current_city_id
,
device_id
,
version
):
self
.
params
[
"start_num"
]
=
start_num
self
.
params
[
"count"
]
=
count
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"device_id"
]
=
device_id
self
.
params
[
"version"
]
=
version
return
self
.
api_send
(
self
.
data
[
"favors_services"
])
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
#个人中心
#个人中心
print
(
user_request
()
.
personal_center
())
print
(
user_request
()
.
personal_center
())
...
@@ -79,6 +112,15 @@ if __name__ == '__main__':
...
@@ -79,6 +112,15 @@ if __name__ == '__main__':
#我的-日记
#我的-日记
print
(
user_request
()
.
my_diary_v2
(
0
,
10
))
print
(
user_request
()
.
my_diary_v2
(
0
,
10
))
#我的-帖子
#我的-帖子
-我发布的
print
(
user_request
()
.
user_tractate
(
1
,
10
))
print
(
user_request
()
.
user_tractate
(
1
,
10
))
#我的-问题
print
(
user_request
()
.
my_question
(
0
,
10
))
#我的-问题
print
(
user_request
()
.
favors_services
(
0
,
10
,
"beijing"
,
"androidid_16a95f3fa31a4c0b"
,
"7.46.0"
))
#我的-帖子-我回复的
print
(
user_request
()
.
reply_tractate
(
1
,
10
,
"7.46.0"
))
all_backend_api/user_request.yaml
View file @
df80bd32
...
@@ -72,7 +72,7 @@ my_diary_v2:
...
@@ -72,7 +72,7 @@ my_diary_v2:
isLogin
:
1
isLogin
:
1
# 我的-帖子
# 我的-帖子
-我发布的
user_tractate
:
user_tractate
:
method
:
GET
method
:
GET
url
:
/api/user/tractate
url
:
/api/user/tractate
...
@@ -83,3 +83,41 @@ user_tractate:
...
@@ -83,3 +83,41 @@ user_tractate:
json
:
{}
json
:
{}
isLogin
:
1
isLogin
:
1
# 我的-问题
my_question
:
method
:
GET
url
:
/api/user/my_question
params
:
start_num
:
${start_num}
count
:
${count}
data
:
{}
json
:
{}
isLogin
:
1
# 我的-收藏
favors_services
:
method
:
GET
url
:
/api/user/favors/services
params
:
start_num
:
${start_num}
count
:
${count}
current_city_id
:
${current_city_id}
device_id
:
${device_id}
version
:
${version}
data
:
{}
json
:
{}
isLogin
:
1
# 我的-帖子-我回复的
reply_tractate
:
method
:
GET
url
:
/api/user/reply/tractate
params
:
page
:
${page}
count
:
${count}
version
:
${version}
data
:
{}
json
:
{}
isLogin
:
1
all_doctor_api/web_request.py
View file @
df80bd32
...
@@ -84,6 +84,10 @@ class web_request(BaseRequest):
...
@@ -84,6 +84,10 @@ class web_request(BaseRequest):
self
.
params
[
"start_time"
]
=
start_time
self
.
params
[
"start_time"
]
=
start_time
self
.
params
[
"end_time"
]
=
end_time
self
.
params
[
"end_time"
]
=
end_time
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_data_info"
])
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_data_info"
])
def
cpc_community_click_logs
(
self
,
page
):
"点点通-内容-推广明细"
self
.
params
[
"page"
]
=
page
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_click_logs"
])
...
@@ -114,3 +118,4 @@ if __name__ == '__main__':
...
@@ -114,3 +118,4 @@ if __name__ == '__main__':
print
(
web_request
()
.
cpc_community_homepage
())
print
(
web_request
()
.
cpc_community_homepage
())
print
(
web_request
()
.
cpc_community_diaries
())
print
(
web_request
()
.
cpc_community_diaries
())
print
(
web_request
()
.
cpc_community_data_info
(
"15604767"
,
"2021-07-02"
,
"2021-07-12"
))
print
(
web_request
()
.
cpc_community_data_info
(
"15604767"
,
"2021-07-02"
,
"2021-07-12"
))
print
(
web_request
()
.
cpc_community_click_logs
(
1
))
\ No newline at end of file
all_doctor_api/web_request.yaml
View file @
df80bd32
...
@@ -181,3 +181,12 @@ cpc_community_data_info:
...
@@ -181,3 +181,12 @@ cpc_community_data_info:
data
:
{}
data
:
{}
json
:
{}
json
:
{}
isLogin
:
1
#需要登录
isLogin
:
1
#需要登录
cpc_community_click_logs
:
method
:
get
url
:
/api/web/cpc_community/click_logs
params
:
page
:
${page}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
path_setting.py
View file @
df80bd32
...
@@ -443,6 +443,8 @@ CPCCOMMUNITYHOMEPAGE=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_d
...
@@ -443,6 +443,8 @@ CPCCOMMUNITYHOMEPAGE=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_d
CPCCOMMUNITYDIARIES
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_community_diaries.yaml"
)
CPCCOMMUNITYDIARIES
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_community_diaries.yaml"
)
#医生后台-点点通内容-数据统计
#医生后台-点点通内容-数据统计
CPCCOMMUNITYDATAINFO
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_community_data_info.yaml"
)
CPCCOMMUNITYDATAINFO
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_community_data_info.yaml"
)
#医生后台-点点通内容-推广明细
CPCCOMMUNITYCLICKLOGS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_community_click_logs.yaml"
)
#更美次卡橱窗组件商品
#更美次卡橱窗组件商品
...
@@ -589,10 +591,21 @@ WINNING_USER_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_
...
@@ -589,10 +591,21 @@ WINNING_USER_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/feed_
MY_DIARY_V2_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.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"
)
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_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"
)
USER_TRACTATE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"user_tractate.yaml"
)
#我的-问题
MY_QUESTION_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
MY_QUESTION
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"my_question.yaml"
)
#我的-收藏
FAVORS_SERVICES_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
FAVORS_SERVICES
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"favors_services.yaml"
)
#我的-帖子-我回复的
REPLY_TRACTATE_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"user_request.yaml"
)
REPLY_TRACTATE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/user_data"
,
"reply_tractate.yaml"
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
print
(
"=========="
,
LIVEYAML_CONFIG
)
print
(
"=========="
,
LIVEYAML_CONFIG
)
test_backend_case/user_case/test_favors_services.py
0 → 100644
View file @
df80bd32
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
TestFavorsServices
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
FAVORS_SERVICES
)
favors_services_case
,
favors_services_data
=
get_ids
(
data
,
"favors_services"
)
@pytest.mark.parametrize
(
"param"
,
favors_services_data
,
ids
=
favors_services_case
)
def
test_favors_services
(
self
,
param
):
r
=
user_request
()
.
favors_services
(
param
[
"start_num"
],
param
[
"count"
],
param
[
"current_city_id"
],
param
[
"device_id"
],
param
[
"version"
])
assert
r
[
"error"
]
==
param
[
"assert"
]
test_backend_case/user_case/test_my_question.py
0 → 100644
View file @
df80bd32
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
TestMyQuestion
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
MY_QUESTION
)
my_question_case
,
my_question_data
=
get_ids
(
data
,
"my_question"
)
@pytest.mark.parametrize
(
"param"
,
my_question_data
,
ids
=
my_question_case
)
def
test_my_question
(
self
,
param
):
r
=
user_request
()
.
my_question
(
param
[
"start_num"
],
param
[
"count"
])
assert
r
[
"error"
]
==
param
[
"assert"
]
test_backend_case/user_case/test_reply_tractate.py
0 → 100644
View file @
df80bd32
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
TestReplyTractate
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
REPLY_TRACTATE
)
reply_tractate_case
,
reply_tractate_data
=
get_ids
(
data
,
"reply_tractate"
)
@pytest.mark.parametrize
(
"param"
,
reply_tractate_data
,
ids
=
reply_tractate_case
)
def
test_reply_tractate
(
self
,
param
):
r
=
user_request
()
.
reply_tractate
(
param
[
"page"
],
param
[
"count"
],
param
[
"version"
])
assert
r
[
"error"
]
==
param
[
"assert"
]
test_backend_data/user_data/favors_services.yaml
0 → 100644
View file @
df80bd32
favors_services
:
#我的-收藏
-
case
:
"
我的页面-收藏"
start_num
:
0
count
:
10
current_city_id
:
"
beijing"
device_id
:
"
androidid_16a95f3fa31a4c0b"
version
:
"
7.46.0"
assert
:
0
test_backend_data/user_data/my_question.yaml
0 → 100644
View file @
df80bd32
my_question
:
#我的-问题
-
case
:
"
我的页面-问题"
start_num
:
0
count
:
10
assert
:
0
test_backend_data/user_data/reply_tractate.yaml
0 → 100644
View file @
df80bd32
reply_tractate
:
#我的-帖子
-
case
:
"
我的页面-帖子-我回复的"
page
:
1
count
:
10
version
:
7.46.0
assert
:
0
test_backend_data/user_data/user_tractate.yaml
View file @
df80bd32
user_tractate
:
user_tractate
:
-
-
#我的-帖子
#我的-帖子
-我发布的
case
:
"
我的页面-帖子"
case
:
"
我的页面-帖子
-我发布的
"
page
:
1
page
:
1
count
:
10
count
:
10
assert
:
0
assert
:
0
...
...
test_doctor_case/web_case/test_cpc_community_click_logs.py
0 → 100644
View file @
df80bd32
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
TestCpcCommunityClickLogs
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CPCCOMMUNITYCLICKLOGS
)
cpccommunityclicklogs_case
,
cpccommunityclicklogs_data
=
get_ids
(
data
,
"cpc_community_click_logs"
)
@pytest.mark.parametrize
(
"param"
,
cpccommunityclicklogs_data
,
ids
=
cpccommunityclicklogs_case
)
def
test_cpc_community_click_logs
(
self
,
param
):
'''点点通内容-数据统计'''
r
=
web_request
()
.
cpc_community_click_logs
(
param
[
"page"
])
if
r
[
"error"
]
==
0
:
click_list
=
r
.
get
(
"data"
)
.
get
(
"click_list"
,
[])
assert
len
(
click_list
)
>=
param
[
"assert"
]
test_doctor_data/web_data/cpc_community_click_logs.yaml
0 → 100644
View file @
df80bd32
cpc_community_click_logs
:
#点点通内容-推广明细case
-
case
:
"
点点通内容-推广明细"
page
:
1
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