Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
InterfaceAutoTest
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TestAuto
InterfaceAutoTest
Commits
f3ca18a2
Commit
f3ca18a2
authored
Apr 30, 2021
by
fanxun
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
# Conflicts: # common/utils.py
parents
95104f7d
e5a47c97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
28 deletions
+2
-28
common/utils.py
+2
-28
No files found.
common/utils.py
View file @
f3ca18a2
import
requests
class
RedisBase
:
import
json
pass
from
config
import
BaseConfig
def
dingTalk
(
webhook
,
message
):
"""发送消息到钉钉群"""
data
=
{
'msgtype'
:
'text'
,
'text'
:
{
"content"
:
message
},
'at'
:
{
'isAtAll'
:
True
}}
post_data
=
json
.
dumps
(
data
)
response
=
requests
.
post
(
webhook
,
headers
=
BaseConfig
.
headers
,
data
=
post_data
)
return
response
.
text
if
__name__
==
'__main__'
:
webhook
=
BaseConfig
.
webhook
message
=
'接口自动化这是测试数据再试试'
print
(
dingTalk
(
webhook
,
message
))
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