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
34ff40e0
Commit
34ff40e0
authored
Aug 03, 2021
by
aha
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'common_dev' into cuixin_dev
parents
5d49fe8f
719174ec
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
283 additions
and
6 deletions
+283
-6
conversation_request.py
all_backend_api/conversation_request.py
+10
-0
conversation_request.yaml
all_backend_api/conversation_request.yaml
+13
-0
web2_request.py
all_doctor_api/web2_request.py
+5
-0
web2_request.yaml
all_doctor_api/web2_request.yaml
+10
-0
web_request.py
all_doctor_api/web_request.py
+24
-5
web_request.yaml
all_doctor_api/web_request.yaml
+27
-0
achelous_request.py
all_om_api/achelous_request.py
+1
-1
achelous_request.yaml
all_om_api/achelous_request.yaml
+1
-0
path_setting.py
path_setting.py
+10
-0
test_detail_live.py
test_backend_case/conversation_case/test_detail_live.py
+16
-0
detail_live.yaml
test_backend_data/conversation_data/detail_live.yaml
+6
-0
test_cpc_doctor_promote_flows.py
test_doctor_case/web2_case/test_cpc_doctor_promote_flows.py
+23
-0
test_cpc_community_promote_flows.py
..._doctor_case/web_case/test_cpc_community_promote_flows.py
+23
-0
test_cpc_promote_flows.py
test_doctor_case/web_case/test_cpc_promote_flows.py
+22
-0
test_cpc_promote_flows_excel.py
test_doctor_case/web_case/test_cpc_promote_flows_excel.py
+20
-0
cpc_doctor_promote_flows.yaml
test_doctor_data/web2_data/cpc_doctor_promote_flows.yaml
+18
-0
cpc_community_promote_flows.yaml
test_doctor_data/web_data/cpc_community_promote_flows.yaml
+18
-0
cpc_promote_flows.yaml
test_doctor_data/web_data/cpc_promote_flows.yaml
+18
-0
cpc_promote_flows_excel.yaml
test_doctor_data/web_data/cpc_promote_flows_excel.yaml
+18
-0
No files found.
all_backend_api/conversation_request.py
View file @
34ff40e0
...
...
@@ -19,11 +19,21 @@ class conversation_request(BaseRequest):
self
.
params
[
"offset_msg_id"
]
=
offset_msg_id
return
self
.
api_send
(
self
.
messageread
[
"detail_messageid"
])
#直播间私信主播
def
detail_live
(
self
,
referrer_id
):
# self.params["referrer"] = referrer
self
.
params
[
"referrer_id"
]
=
referrer_id
# self.params["last_msg_id"] = last_msg_id
# self.params["offset_msg_id"] = offset_msg_id
return
self
.
api_send
(
self
.
messageread
[
"detail_live"
])
if
__name__
==
'__main__'
:
print
(
conversation_request
()
.
message_read
(
"beijing"
,
1
,
'[10622,10626,10646,10651]'
))
print
(
"---------"
)
print
(
conversation_request
()
.
detail_messageid
(
10
,
0
,
0
))
print
(
conversation_request
()
.
detail_live
(
737
))
...
...
all_backend_api/conversation_request.yaml
View file @
34ff40e0
...
...
@@ -22,3 +22,16 @@ detail_messageid:
json
:
{}
isLogin
:
1
#需要登录的接口
#直播间私信主播
detail_live
:
method
:
get
url
:
/api/conversation/detail/33909791_33910245
params
:
referrer
:
${referrer}
# referrer_id: ${referrer_id}
# last_msg_id: ${last_msg_id}
# offset_msg_id: ${offset_msg_id}
data
:
{}
json
:
{}
isLogin
:
1
all_doctor_api/web2_request.py
View file @
34ff40e0
...
...
@@ -78,6 +78,10 @@ class web2_request(BaseRequest):
self
.
params
[
"category_id"
]
=
category_id
return
self
.
api_send
(
self
.
SERVICE_URL
[
"artemis_cpc_category_service_ids"
])
def
cpc_doctor_promote_flows
(
self
,
month
):
"点点通机构-历史每月推广明细"
self
.
params
[
"month"
]
=
month
return
self
.
api_send
(
self
.
SERVICE_URL
[
"cpc_doctor_promote_flows"
])
if
__name__
==
'__main__'
:
print
(
web2_request
()
.
service_list
(
"1"
,
"10"
,
"-1"
,
"-1"
))
...
...
@@ -92,4 +96,5 @@ if __name__ == '__main__':
print
(
web2_request
()
.
artemis_cpc_categorypromotemanage_list
(
-
1
,
-
1
))
print
(
web2_request
()
.
artemis_cpc_category_query
(
"wangyang"
,
0
))
print
(
web2_request
()
.
artemis_cpc_category_service_ids
(
1
,
10
,
-
1
,
8
))
print
(
web2_request
()
.
cpc_doctor_promote_flows
(
"2021-7"
))
all_doctor_api/web2_request.yaml
View file @
34ff40e0
...
...
@@ -121,4 +121,13 @@ artemis_cpc_category_service_ids:
category_id
:
${category_id}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
cpc_doctor_promote_flows
:
method
:
get
url
:
/api/web2/cpc_doctor/promote/flows
params
:
month
:
${month}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
\ No newline at end of file
all_doctor_api/web_request.py
View file @
34ff40e0
...
...
@@ -63,37 +63,53 @@ class web_request(BaseRequest):
# return self.api_send(self.ACCOUNT_URL["file_upload"])
def
cpc_homepage
(
self
):
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_homepage"
])
def
artemis_ad_type_list
(
self
):
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"artemis_ad_type_list"
])
def
artemis_order_list
(
self
,
status
,
page
):
self
.
params
[
"status"
]
=
status
self
.
params
[
"page"
]
=
page
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"artemis_order_list"
])
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"
])
def
cpc_community_diaries
(
self
):
"点点通-内容-数据统计-内容"
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_diaries"
])
def
cpc_community_data_info
(
self
,
diary_id
,
start_time
,
end_time
):
"点点通-内容-数据统计"
self
.
params
[
"diary_id"
]
=
diary_id
self
.
params
[
"start_time"
]
=
start_time
self
.
params
[
"end_time"
]
=
end_time
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"
])
def
cpc_promote_flows
(
self
,
month
):
"点点通商品-历史每月推广明细"
self
.
params
[
"month"
]
=
month
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_promote_flows"
])
def
cpc_promote_flows_excel
(
self
,
month
):
"点点通商品-历史每月推广明细-导出"
self
.
params
[
"month"
]
=
month
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_promote_flows_excel"
])
def
cpc_community_promote_flows
(
self
,
month
):
"点点通内容-历史每月推广明细"
self
.
params
[
"month"
]
=
month
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"cpc_community_promote_flows"
])
if
__name__
==
'__main__'
:
...
...
@@ -118,4 +134,7 @@ if __name__ == '__main__':
print
(
web_request
()
.
cpc_community_homepage
())
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_click_logs
(
1
))
\ No newline at end of file
print
(
web_request
()
.
cpc_community_click_logs
(
1
))
print
(
web_request
()
.
cpc_promote_flows
(
"2021-7"
))
print
(
web_request
()
.
cpc_promote_flows_excel
(
"2021-7"
))
print
(
web_request
()
.
cpc_community_promote_flows
(
"2021-7"
))
\ No newline at end of file
all_doctor_api/web_request.yaml
View file @
34ff40e0
...
...
@@ -190,3 +190,30 @@ cpc_community_click_logs:
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
cpc_promote_flows
:
method
:
get
url
:
/api/web/cpc/promote/flows
params
:
month
:
${month}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
cpc_promote_flows_excel
:
method
:
get
url
:
/api/web/cpc/promote/flows/excel
params
:
month
:
${month}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
cpc_community_promote_flows
:
method
:
get
url
:
/api/web/cpc_community/promote/flows
params
:
month
:
${month}
data
:
{}
json
:
{}
isLogin
:
1
#需要登录
all_om_api/achelous_request.py
View file @
34ff40e0
...
...
@@ -4,7 +4,7 @@ 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
...
...
all_om_api/achelous_request.yaml
View file @
34ff40e0
#批量添加直播间商品
batch_add_service
:
method
:
post
url
:
/achelous/live/batch_add_service
...
...
path_setting.py
View file @
34ff40e0
...
...
@@ -305,6 +305,8 @@ DETAIL_MESSAGEID = os.path.join(BASE_DIR, "backend_auto/test_backend_data/conver
#消息
MESSAGE_READ_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"conversation_request.yaml"
)
MESSAGE_READ
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/conversation_data"
,
"message_read.yaml"
)
#直播私信主播
DETAIL_LIVE
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_backend_data/conversation_data"
,
"detail_live.yaml"
)
#消息页未读数
UNREAD_CONFIG
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/all_backend_api"
,
"notification_request.yaml"
)
...
...
@@ -485,6 +487,14 @@ CPCCATEGORYPROMOTEMANAGELIST=os.path.join(BASE_DIR, "backend_auto/test_doctor_da
CPCCATEGORYQUERY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"artemis_cpc_category_query.yaml"
)
#医生后台-点点通商品-品类推广管理-新增推广品类-关联美购
CPCCATEGORYSERVICEIDS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"artemis_cpc_category_service_ids.yaml"
)
#医生后台-点点通商品-历史每月推广数据
CPCPROMOTEFLOWS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_promote_flows.yaml"
)
#医生后台-点点通商品-历史每月推广数据-导出
CPCPROMOTEFLOWSEXCEL
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_promote_flows_excel.yaml"
)
#医生后台-点点通内容-历史每月推广数据
CPCCOMMUNITYPROMOTEFLOWS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"cpc_community_promote_flows.yaml"
)
#医生后台-点点通机构-历史每月推广数据
CPCDOCTORPROMOTEFLOWS
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web2_data"
,
"cpc_doctor_promote_flows.yaml"
)
...
...
test_backend_case/conversation_case/test_detail_live.py
0 → 100644
View file @
34ff40e0
import
pytest
import
path_setting
from
ids_list
import
get_ids
from
in_common.base_request
import
BaseRequest
from
all_backend_api.conversation_request
import
conversation_request
class
TestDetailLive
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
DETAIL_LIVE
)
detail_live_case
,
detail_live_data
=
get_ids
(
data
,
"detail_live"
)
@pytest.mark.parametrize
(
"param"
,
detail_live_data
,
ids
=
detail_live_case
)
def
test_detail_live
(
self
,
param
):
r
=
conversation_request
()
.
detail_live
(
param
[
"referrer_id"
])
if
r
[
"error"
]
==
0
:
assert
r
[
"error"
]
==
param
[
"assert"
]
\ No newline at end of file
test_backend_data/conversation_data/detail_live.yaml
0 → 100644
View file @
34ff40e0
detail_live
:
-
case
:
"
直播私信主播"
referrer_id
:
737
assert
:
0
\ No newline at end of file
test_doctor_case/web2_case/test_cpc_doctor_promote_flows.py
0 → 100644
View file @
34ff40e0
import
pytest
from
ids_list
import
get_ids
import
path_setting
from
in_common.base_request
import
BaseRequest
from
all_doctor_api.web2_request
import
web2_request
class
TestCpcDoctorPromoteFlows
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CPCDOCTORPROMOTEFLOWS
)
cpcdoctorpromoteflows_case
,
cpcdoctorpromoteflows_data
=
get_ids
(
data
,
"cpc_doctor_promote_flows"
)
@pytest.mark.parametrize
(
"param"
,
cpcdoctorpromoteflows_data
,
ids
=
cpcdoctorpromoteflows_case
)
def
test_cpc_doctor_promote_flows
(
self
,
param
):
'''点点通商品-历史每月推广明细-导出'''
r
=
web2_request
()
.
cpc_doctor_promote_flows
(
param
[
"month"
])
if
r
[
"error"
]
==
0
:
flows_list
=
r
.
get
(
"data"
)
.
get
(
"flows_list"
,
[])
assert
len
(
flows_list
)
>=
param
[
"assert"
]
test_doctor_case/web_case/test_cpc_community_promote_flows.py
0 → 100644
View file @
34ff40e0
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
TestCpcCommunityPromoteFlows
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CPCCOMMUNITYPROMOTEFLOWS
)
cpccommunitypromoteflows_case
,
cpccommunitypromoteflows_data
=
get_ids
(
data
,
"cpc_community_promote_flows"
)
@pytest.mark.parametrize
(
"param"
,
cpccommunitypromoteflows_data
,
ids
=
cpccommunitypromoteflows_case
)
def
test_cpc_community_promote_flows
(
self
,
param
):
'''点点通商品-历史每月推广明细-导出'''
r
=
web_request
()
.
cpc_community_promote_flows
(
param
[
"month"
])
if
r
[
"error"
]
==
0
:
flows_list
=
r
.
get
(
"data"
)
.
get
(
"flows_list"
,
[])
assert
len
(
flows_list
)
>=
param
[
"assert"
]
test_doctor_case/web_case/test_cpc_promote_flows.py
0 → 100644
View file @
34ff40e0
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
TestCpcPromoteFlows
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CPCPROMOTEFLOWS
)
cpcpromoteflows_case
,
cpcpromoteflows_data
=
get_ids
(
data
,
"cpc_promote_flows"
)
@pytest.mark.parametrize
(
"param"
,
cpcpromoteflows_data
,
ids
=
cpcpromoteflows_case
)
def
test_cpc_promote_flows
(
self
,
param
):
'''点点通商品-历史每月推广明细'''
r
=
web_request
()
.
cpc_promote_flows
(
param
[
"month"
])
if
r
[
"error"
]
==
0
:
flows_list
=
r
.
get
(
"data"
)
.
get
(
"flows_list"
,
[])
assert
len
(
flows_list
)
>=
param
[
"assert"
]
test_doctor_case/web_case/test_cpc_promote_flows_excel.py
0 → 100644
View file @
34ff40e0
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
TestCpcPromoteFlows
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CPCPROMOTEFLOWSEXCEL
)
cpcpromoteflowsexcel_case
,
cpcpromoteflowsexcel_data
=
get_ids
(
data
,
"cpc_promote_flows_excel"
)
@pytest.mark.parametrize
(
"param"
,
cpcpromoteflowsexcel_data
,
ids
=
cpcpromoteflowsexcel_case
)
def
test_cpc_promote_flows_excel
(
self
,
param
):
'''点点通商品-历史每月推广明细-导出'''
r
=
web_request
()
.
cpc_promote_flows_excel
(
param
[
"month"
])
assert
r
[
"error"
]
==
0
test_doctor_data/web2_data/cpc_doctor_promote_flows.yaml
0 → 100644
View file @
34ff40e0
cpc_doctor_promote_flows
:
#点点通机构-历史每月推广数据
-
case
:
"
点点通机构-历史每月推广数据-21年7月"
month
:
"
2021-7"
assert
:
0
-
case
:
"
点点通机构-历史每月推广数据-20年7月"
month
:
"
2020-7"
assert
:
0
-
case
:
"
点点通机构-历史每月推广数据-25年7月"
month
:
"
2025-7"
assert
:
0
\ No newline at end of file
test_doctor_data/web_data/cpc_community_promote_flows.yaml
0 → 100644
View file @
34ff40e0
cpc_community_promote_flows
:
#点点通内容-历史每月推广数据
-
case
:
"
点点通内容-历史每月推广数据-21年7月"
month
:
"
2021-7"
assert
:
0
-
case
:
"
点点通内容-历史每月推广数据-20年7月"
month
:
"
2020-7"
assert
:
0
-
case
:
"
点点通内容-历史每月推广数据-25年7月"
month
:
"
2025-7"
assert
:
0
\ No newline at end of file
test_doctor_data/web_data/cpc_promote_flows.yaml
0 → 100644
View file @
34ff40e0
cpc_promote_flows
:
#点点通商品-历史每月推广数据
-
case
:
"
点点通商品-历史每月推广数据-21年7月"
month
:
"
2021-7"
assert
:
0
-
case
:
"
点点通商品-历史每月推广数据-20年7月"
month
:
"
2020-7"
assert
:
0
-
case
:
"
点点通商品-历史每月推广数据-25年7月"
month
:
"
2025-7"
assert
:
0
\ No newline at end of file
test_doctor_data/web_data/cpc_promote_flows_excel.yaml
0 → 100644
View file @
34ff40e0
cpc_promote_flows_excel
:
#点点通商品-历史每月推广数据-导出
-
case
:
"
点点通商品-历史每月推广数据-导出-21年7月"
month
:
"
2021-7"
assert
:
0
-
case
:
"
点点通商品-历史每月推广数据-导出-20年7月"
month
:
"
2020-7"
assert
:
0
-
case
:
"
点点通商品-历史每月推广数据-导出-25年7月"
month
:
"
2025-7"
assert
:
0
\ 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