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
10bb47ce
Commit
10bb47ce
authored
Jun 16, 2021
by
张淑琴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发送私信
parent
0d6e9bee
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
84 additions
and
8 deletions
+84
-8
web_request.py
all_doctor_api/web_request.py
+11
-3
web_request.yaml
all_doctor_api/web_request.yaml
+15
-2
host.yaml
host.yaml
+3
-3
path_setting.py
path_setting.py
+2
-0
test_conversation_user_id.py
test_doctor_case/web_case/test_conversation_user_id.py
+32
-0
conversation_user_id.yaml
test_doctor_data/web_data/conversation_user_id.yaml
+21
-0
No files found.
all_doctor_api/web_request.py
View file @
10bb47ce
...
...
@@ -43,6 +43,14 @@ class web_request(BaseRequest):
def
service_all
(
self
):
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"service_all"
])
def
conversation_user_id
(
self
,
type
,
content
,
doctor_user_id
,
t
,
csrfmiddlewaretoken
):
self
.
params
[
"type"
]
=
type
self
.
params
[
"content"
]
=
content
self
.
params
[
"doctor_user_id"
]
=
doctor_user_id
self
.
params
[
"t"
]
=
t
self
.
params
[
"csrfmiddlewaretoken"
]
=
csrfmiddlewaretoken
return
self
.
api_send
(
self
.
ACCOUNT_URL
[
"conversation_user_id"
])
# def file_upload(self, img_type,csrfmiddlewaretoken,id,name,type,lastModifiedDate,size,file):
# self.params["img_type"] = img_type
# self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
...
...
@@ -65,8 +73,8 @@ if __name__ == '__main__':
print
(
web_request
()
.
conversation
(
0
,
1
))
print
(
web_request
()
.
conversation_unread_list
(
1
))
print
(
web_request
()
.
service
())
print
(
"发送"
)
print
(
web_request
()
.
conversation_diary
(
602329
))
print
(
web_request
()
.
conversation_coupon
(
602329
))
print
(
web_request
()
.
service_all
())
# print(web_request().file_upload("19","PC8uTySuxipukIMuqNV1OPB376C2ZZ3g","WU_FILE_0","lADPDg7mQdiUTiLNAZDNAZA_400_400.jpg_720x720g.jpg","image/jpeg","Mon Apr 26 2021 11:29:45 GMT+0800 (中国标准时间)","17688","(binary)"))
\ No newline at end of file
# print(web_request().file_upload("19","PC8uTySuxipukIMuqNV1OPB376C2ZZ3g","WU_FILE_0","lADPDg7mQdiUTiLNAZDNAZA_400_400.jpg_720x720g.jpg","image/jpeg","Mon Apr 26 2021 11:29:45 GMT+0800 (中国标准时间)","17688","(binary)"))
print
(
web_request
()
.
conversation_user_id
(
0
,
"您好"
,
602329
,
"271caac2ae1687ca0a56ee18115b8183"
,
"NLeTxEx1BOQo1zjv2us9BQ00ViMAHGpJ"
))
\ No newline at end of file
all_doctor_api/web_request.yaml
View file @
10bb47ce
...
...
@@ -106,4 +106,17 @@ service_all:
# size: ${size}
# file: ${file}
# json: {}
# isLogin: 1
\ No newline at end of file
# isLogin: 1
conversation_user_id
:
method
:
post
url
:
/api/web/conversation/602329_33909952
params
:
{}
data
:
type
:
${type}
content
:
${content}
doctor_user_id
:
${doctor_user_id}
t
:
${t}
csrfmiddlewaretoken
:
${csrfmiddlewaretoken}
json
:
{}
isLogin
:
1
#需要登录
\ No newline at end of file
host.yaml
View file @
10bb47ce
develop_host
:
backend
:
http://backend.paas-develop.env
om
:
http://om.paas-develop.env
#
doctor: http://doctor.paas-develop.env
#
backend: http://backend.paas-develop.env
#
om: http://om.paas-develop.env
doctor
:
http://doctor.paas-develop.env
# backend: https://backend.igengmei.com
path_setting.py
View file @
10bb47ce
...
...
@@ -337,6 +337,8 @@ SERVICE=os.path.join(BASE_DIR, "backend_auto/test_doctor_data/web_data", "servic
CONVERSATIONDIARY
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"conversation_diary.yaml"
)
#医生后台-发送优惠券
CONVERSATIONCOUPON
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"conversation_coupon.yaml"
)
#医生后台-发送私信
CONVERSATIONUSERID
=
os
.
path
.
join
(
BASE_DIR
,
"backend_auto/test_doctor_data/web_data"
,
"conversation_user_id.yaml"
)
#更美次卡橱窗组件商品
...
...
test_doctor_case/web_case/test_conversation_user_id.py
0 → 100644
View file @
10bb47ce
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
TestConversationUserID
:
data
=
BaseRequest
()
.
api_load
(
path_setting
.
CONVERSATIONUSERID
)
userid_case
,
userid_data
=
get_ids
(
data
,
"conversation_user_id"
)
@pytest.mark.parametrize
(
"param"
,
userid_data
,
ids
=
userid_case
)
def
test_conversation_user_id
(
self
,
param
):
'''发送私信'''
r
=
web_request
()
.
conversation_user_id
(
param
[
"type"
],
param
[
"content"
],
param
[
"doctor_user_id"
],
param
[
"t"
],
param
[
"csrfmiddlewaretoken"
])
print
(
r
)
if
r
[
"error"
]
==
0
:
assert
r
[
"data"
][
"name"
]
==
param
[
"assert_name"
]
assert
r
[
"message"
]
==
param
[
"assert_message"
]
if
r
[
"error"
]
==
300009
:
assert
r
[
"message"
]
==
param
[
"assert_message1"
]
# if r["error"] == 300005:
# assert r["message"] == param["assert_message2"]#assert_message2: "该方法未经授权,无法访问"
test_doctor_data/web_data/conversation_user_id.yaml
0 → 100644
View file @
10bb47ce
conversation_user_id
:
#发送私信case
-
case
:
"
发送成功"
type
:
0
content
:
您好
doctor_user_id
:
602329
t
:
271caac2ae1687ca0a56ee18115b8183
csrfmiddlewaretoken
:
NLeTxEx1BOQo1zjv2us9BQ00ViMAHGpJ
assert_message
:
"
消息发送成功"
assert_name
:
"
露露2"
-
case
:
"
发送失败"
type
:
0
content
:
您好
doctor_user_id
:
6023291
t
:
271caac2ae1687ca0a56ee18115b8183
csrfmiddlewaretoken
:
NLeTxEx1BOQo1zjv2us9BQ00ViMAHGpJ
assert_message1
:
"
没有权限!"
assert_name1
:
"
露露2"
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