Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zmops-test
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sanshi
zmops-test
Commits
d80d2750
Commit
d80d2750
authored
Dec 05, 2019
by
sanshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
创建资产
parent
d4c8fc95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
test_device_create.py
WorkCase/APP/Device/test_device_create.py
+6
-3
No files found.
WorkCase/APP/Device/test_device_create.py
View file @
d80d2750
...
@@ -43,6 +43,8 @@ class TestDeviceCreate(object):
...
@@ -43,6 +43,8 @@ class TestDeviceCreate(object):
base_port
=
999
base_port
=
999
base_name
=
"SS测试资产-创建"
base_name
=
"SS测试资产-创建"
base_business_id_1
=
12
base_business_id_2
=
13
@classmethod
@classmethod
def
setup_class
(
cls
):
def
setup_class
(
cls
):
...
@@ -154,7 +156,7 @@ class TestDeviceCreate(object):
...
@@ -154,7 +156,7 @@ class TestDeviceCreate(object):
assert
y
.
iplist
==
iplist
assert
y
.
iplist
==
iplist
assert
y
.
dns
==
dns
assert
y
.
dns
==
dns
assert
int
(
y
.
monitor_interface
)
==
monitor_interface
assert
int
(
y
.
monitor_interface
)
==
monitor_interface
assert
int
(
y
.
business_ids
)
==
business_ids
assert
y
.
business_ids
==
str
(
self
.
base_business_id_1
)
+
","
+
str
(
self
.
base_business_id_2
)
# assert y.port == port
# assert y.port == port
assert
y
.
ops_person
==
ops_person
assert
y
.
ops_person
==
ops_person
assert
y
.
factory_id
==
factoryId
assert
y
.
factory_id
==
factoryId
...
@@ -260,7 +262,8 @@ class TestDeviceCreate(object):
...
@@ -260,7 +262,8 @@ class TestDeviceCreate(object):
name
=
self
.
base_name
+
"08"
name
=
self
.
base_name
+
"08"
response
=
self
.
device_create
(
token
=
self
.
token
,
hostName
=
name
,
hostType
=
self
.
base_type_agent
,
iplist
=
self
.
base_ip
,
monitorInterface
=
self
.
base_port
,
response
=
self
.
device_create
(
token
=
self
.
token
,
hostName
=
name
,
hostType
=
self
.
base_type_agent
,
iplist
=
self
.
base_ip
,
monitorInterface
=
self
.
base_port
,
monitorType
=
1
,
manageLevel
=
1
,
parentHost
=
"parentHost"
,
businessIds
=
[
1
],
opsPerson
=
11
,
snmpCommunity
=
"snmpCommunity"
,
monitorType
=
1
,
manageLevel
=
1
,
parentHost
=
"parentHost"
,
businessIds
=
[
self
.
base_business_id_1
,
self
.
base_business_id_2
],
opsPerson
=
11
,
snmpCommunity
=
"snmpCommunity"
,
ipmiAuthtype
=
1
,
ipmiPrivilege
=
1
,
ipmiUsername
=
"ipmiUsername"
,
ipmiPassword
=
"ipmiPassword"
,
ipmiAuthtype
=
1
,
ipmiPrivilege
=
1
,
ipmiUsername
=
"ipmiUsername"
,
ipmiPassword
=
"ipmiPassword"
,
factoryId
=
1
,
model
=
"model"
,
version
=
"version"
,
serialnumber
=
"serialnumber"
,
description
=
"description"
,
factoryId
=
1
,
model
=
"model"
,
version
=
"version"
,
serialnumber
=
"serialnumber"
,
description
=
"description"
,
monitorStatus
=
1
)
monitorStatus
=
1
)
...
@@ -285,4 +288,4 @@ if __name__ == "__main__":
...
@@ -285,4 +288,4 @@ if __name__ == "__main__":
# a = TestDeviceCreate()
# a = TestDeviceCreate()
# a.setup_class()
# a.setup_class()
# a.test_case_0
4
()
# a.test_case_0
8
()
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