Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xm-uitest-sow
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
xiamai-test
xm-uitest-sow
Commits
335668d8
You need to sign in or sign up before continuing.
Commit
335668d8
authored
Jul 29, 2021
by
mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
review
parent
57369b89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/framework/common.py
+7
-7
No files found.
src/framework/common.py
View file @
335668d8
...
...
@@ -100,12 +100,12 @@ def get_token(user, Terminal = 'SOW-B'):
return
r
.
json
()[
"message"
]
return
xmtoken
elif
Terminal
==
'SOW-C'
:
enterp
e
ise_id
=
readConfig
.
test_header
(
user
)[
'enterpriseId'
]
enterp
r
ise_id
=
readConfig
.
test_header
(
user
)[
'enterpriseId'
]
user_id
=
readConfig
.
test_header
(
user
)[
'userId'
]
headers
=
{
"Content-Type"
:
"application/json; charset=UTF-8"
,
"User-Agent"
:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/91.0.4472.77 Safari/537.36"
}
params
=
{
"enterpriseId"
:
enterp
e
ise_id
,
"userId"
:
user_id
,
"appTermEnum"
:
"XIAOMAI_CLOUD_CLASS_PC_WEB_ADMIN"
}
params
=
{
"enterpriseId"
:
enterp
r
ise_id
,
"userId"
:
user_id
,
"appTermEnum"
:
"XIAOMAI_CLOUD_CLASS_PC_WEB_ADMIN"
}
data
=
json
.
dumps
(
params
)
url
=
"https://gateway.xiaomai5.com/hades/anon/hades/getWXWorkLoginNoCheck"
r
=
requests
.
post
(
url
=
url
,
data
=
data
,
headers
=
headers
)
...
...
@@ -120,11 +120,11 @@ def get_token(user, Terminal = 'SOW-B'):
# 创建一个直播课,返回课程id和课程名称
def
create_a_live
(
start_time
,
start_time2
=
None
,
user
=
"lgw-b"
):
xmtoken
=
get_token
(
user
=
user
,
Terminal
=
'SOW-B'
)[
"xmToken"
]
basic_i
mfor
ation
=
readConfig
.
test_header
(
header_name
=
user
)
userId
=
basic_i
mfor
ation
[
'userId'
]
storeId
=
basic_i
mfor
ation
[
'storeId'
]
storeUserId
=
basic_i
mfor
ation
[
'storeUserId'
]
enterpriseId
=
basic_i
mfor
ation
[
'enterpriseId'
]
basic_i
nform
ation
=
readConfig
.
test_header
(
header_name
=
user
)
userId
=
basic_i
nform
ation
[
'userId'
]
storeId
=
basic_i
nform
ation
[
'storeId'
]
storeUserId
=
basic_i
nform
ation
[
'storeUserId'
]
enterpriseId
=
basic_i
nform
ation
[
'enterpriseId'
]
while
xmtoken
==
"登录过频繁"
:
# 休息15s是因为可能会登录频繁
time
.
sleep
(
15
)
...
...
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