Commit 90e1cedb by sanshi

资产ips下拉框

parent a31a8792
...@@ -215,9 +215,13 @@ class TestDeviceAssetIps(object): ...@@ -215,9 +215,13 @@ class TestDeviceAssetIps(object):
response = self.device_asset_ips(token=self.token, ipName=self.base_ip) response = self.device_asset_ips(token=self.token, ipName=self.base_ip)
self.check_code(response=response, code=0) self.check_code(response=response, code=0)
data = UtilsResponse().get_data(response=response) data = UtilsResponse().get_data(response=response)
ids = []
for x, y in enumerate(data): for x, y in enumerate(data):
assert y["id"] == self.device_id ids.append(y["id"])
assert y["name"] == self.base_ip sql = self.select_hosts(hostid=y["id"])
for q, w in enumerate(sql):
assert y["name"] == w.manage_ip
assert self.device_id in ids
if __name__ == "__main__": if __name__ == "__main__":
......
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