Commit 7bd54d7b by sanshi

设备

parent 81126a70
......@@ -181,7 +181,7 @@ class TestDeviceDelete(object):
def case_create(self, num):
name = self.base_name + num
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=self.base_business_id_1 + "," + self.base_business_id_2,
monitorType=1, manageLevel=1, parentHost=1, businessIds=self.base_business_id_1 + "," + self.base_business_id_2,
opsPerson=11, snmpCommunity="snmpCommunity",
ipmiAuthtype=1, ipmiPrivilege=1, ipmiUsername="ipmiUsername", ipmiPassword="ipmiPassword",
factoryId=1, model="model", version="version", serialnumber="serialnumber", description="description",
......@@ -253,11 +253,11 @@ if __name__ == "__main__":
import os
# 执行自动化测试用例
# case_info = os.path.split(__file__)
# case = UtilsCmd().pytest_cmd()
# r = UtilsPyTest(case=case, case_info=case_info)
# r.run_main()
a = TestDeviceDelete()
a.setup_class()
a.test_case_05()
case_info = os.path.split(__file__)
case = UtilsCmd().pytest_cmd()
r = UtilsPyTest(case=case, case_info=case_info)
r.run_main()
# a = TestDeviceDelete()
# a.setup_class()
# a.test_case_05()
......@@ -166,7 +166,7 @@ class TestDeviceGet(object):
self.name = self.base_name + num
response = self.device_create(token=self.token, hostName=self.name, hostType=self.base_type_agent,
iplist=self.base_ip, monitorInterface=self.base_port,
monitorType=1, manageLevel=1, parentHost="parentHost",
monitorType=1, manageLevel=1, parentHost=1,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2,
businessTree="businessTree", opsPerson=11, snmpCommunity="snmpCommunity",
ipmiAuthtype=1, ipmiPrivilege=1, ipmiUsername="ipmiUsername", ipmiPassword="ipmiPassword",
......@@ -312,6 +312,13 @@ class TestDeviceGet(object):
self.check_code(response=response, code=0)
self.check_data(response=response, _key="manageIp", _value=self.base_ip)
@allure.title("device.get:menuId查询")
@allure.story("查询资产:menuId查询")
def test_case_14(self):
self.get_base_token()
response = self.device_get(token=self.token, menuId=1)
self.check_code(response=response, code=0)
if __name__ == "__main__":
from WorkUtils.UtilsPyTest import UtilsPyTest
......@@ -327,4 +334,4 @@ if __name__ == "__main__":
# a = TestDeviceGet()
# a.setup_class()
# a.test_case_06()
# a.test_case_14()
......@@ -38,7 +38,8 @@ class CaseBase:
"db_port": 3306,
"db_user": "root",
"db_pw": "123456",
"db_base": "argus"
"db_base": "argus",
"db_base_zabbix": "zabbix"
}
self.status = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment