Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-spd
Commits
f96691e9
Commit
f96691e9
authored
Aug 03, 2023
by
xiao-hesheng
Browse files
修改http_post函数,增加json内容转义
parent
1d228013
Changes
2
Hide whitespace changes
Inline
Side-by-side
common/common_func.py
View file @
f96691e9
...
...
@@ -96,7 +96,8 @@ class commonFuc(object):
"""
一个post请求,返回json
"""
result
=
requests
.
post
(
url
,
data
=
postdata
,
headers
=
header
)
# result = requests.post(url, data=postdata, headers=header)
result
=
requests
.
post
(
url
,
data
=
json
.
dumps
(
postdata
),
headers
=
header
)
result
=
json
.
loads
(
result
.
content
)
return
result
...
...
@@ -453,4 +454,10 @@ class commonFuc(object):
url
=
'http://search-index.babytree.com'
else
:
url
=
'http://sit-search-index.babytree.com'
return
url
\ No newline at end of file
return
url
#随机n位字符串,返回n位字符串
def
randomString
(
self
,
n
):
import
string
import
random
s
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
+
"!@#$%^&*()"
,
n
))
return
s
\ No newline at end of file
report/summary.html
View file @
f96691e9
...
...
@@ -72,9 +72,9 @@
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/
登录外网系统
/log.html'
target=
'_blank'
>
登录外网系统
</a></td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/
外网企业注册-器械注册人
/log.html'
target=
'_blank'
>
外网企业注册-器械注册人
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
0.1
</td>
<td
class=
"details-col-elapsed"
>
0.1
39
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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