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
113d711b
Commit
113d711b
authored
Apr 30, 2021
by
fanxun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
目录结构调整
parent
c2f0341b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
14 deletions
+15
-14
common/__init__.py
+1
-1
common/study.py
+0
-2
common/utils/__init__.py
+0
-0
common/utils/dingTalk.py
+13
-0
common/utils/encryption.py
+1
-11
requirements.txt
+0
-0
No files found.
common/__init__.py
View file @
113d711b
from
common
import
db
...
...
common/study.py
deleted
100644 → 0
View file @
c2f0341b
print
(
'hello'
)
\ No newline at end of file
common/utils/__init__.py
0 → 100644
View file @
113d711b
common/utils/dingTalk.py
0 → 100644
View file @
113d711b
import
requests
import
json
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
\ No newline at end of file
common/utils.py
→
common/utils
/encryption
.py
View file @
113d711b
import
requests
,
hashlib
import
json
from
config
import
BaseConfig
import
hashlib
from
Crypto.Cipher
import
AES
from
Crypto.Util.Padding
import
pad
from
base64
import
encodebytes
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
# 加密类
class
Encryption
:
...
...
requirements.txt
0 → 100644
View file @
113d711b
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