summaryrefslogtreecommitdiffstats
path: root/testsuites/vstf/vstf_scripts/vstf/controller/unittest/test_collect.py
diff options
context:
space:
mode:
authoryuyang <Gabriel.yuyang@huawei.com>2016-10-01 02:21:36 +0800
committeryuyang <Gabriel.yuyang@huawei.com>2016-10-01 02:23:53 +0800
commit6204bfbe6228d5167bdb67c42cac4c884cdcf664 (patch)
treeb67981719c8aa0542e040d70951bdb7aff044aad /testsuites/vstf/vstf_scripts/vstf/controller/unittest/test_collect.py
parent3ac496ac711f40f2a4c4fb0837758b4fbade43e4 (diff)
autopep8 fix for flake8
JIRA: BOTTLENECK-101 Using autopep8 to fix the python style scanned by flake8 Change-Id: I74bf28ed4d999dac3dd36e9101f099c9853a49b6 Signed-off-by: yuyang <Gabriel.yuyang@huawei.com>
Diffstat (limited to 'testsuites/vstf/vstf_scripts/vstf/controller/unittest/test_collect.py')
-rw-r--r--testsuites/vstf/vstf_scripts/vstf/controller/unittest/test_collect.py36
1 files changed, 23 insertions, 13 deletions
diff --git a/testsuites/vstf/vstf_scripts/vstf/controller/unittest/test_collect.py b/testsuites/vstf/vstf_scripts/vstf/controller/unittest/test_collect.py
index 3e84d019..e8e9dd8c 100644
--- a/testsuites/vstf/vstf_scripts/vstf/controller/unittest/test_collect.py
+++ b/testsuites/vstf/vstf_scripts/vstf/controller/unittest/test_collect.py
@@ -15,31 +15,41 @@ from vstf.controller.unittest import model
class TestCollect(model.Test):
-
+
def setUp(self):
super(TestCollect, self).setUp()
self.obj = env_collect.EnvCollectApi(self.conn)
-
+
def test_collect_host_info(self):
- ret_str = json.dumps(self.obj.collect_host_info(self.tester_host), indent = 4)
- for key in ("CPU INFO","MEMORY INFO","HW_INFO","OS INFO"):
- self.assertTrue(key in ret_str, "collect_host_info failed, ret_str = %s" % ret_str)
-
+ ret_str = json.dumps(
+ self.obj.collect_host_info(
+ self.tester_host), indent=4)
+ for key in ("CPU INFO", "MEMORY INFO", "HW_INFO", "OS INFO"):
+ self.assertTrue(
+ key in ret_str,
+ "collect_host_info failed, ret_str = %s" %
+ ret_str)
+
def test_list_nic_devices(self):
- ret_str = json.dumps(self.obj.list_nic_devices(self.tester_host), indent = 4)
- for key in ("device","mac","bdf","desc"):
- self.assertTrue(key in ret_str, "list_nic_devices failed, ret_str = %s" % ret_str)
+ ret_str = json.dumps(
+ self.obj.list_nic_devices(
+ self.tester_host), indent=4)
+ for key in ("device", "mac", "bdf", "desc"):
+ self.assertTrue(
+ key in ret_str,
+ "list_nic_devices failed, ret_str = %s" %
+ ret_str)
print ret_str
-
+
def test_get_device_detail(self):
identity = "01:00.0"
ret = self.obj.get_device_detail(self.tester_host, "01:00.0")
- for key in ("device","mac","bdf","desc"):
+ for key in ("device", "mac", "bdf", "desc"):
self.assertTrue(key in ret)
self.assertTrue(ret['bdf'] == identity)
if __name__ == "__main__":
import logging
- logging.basicConfig(level = logging.INFO)
- unittest.main() \ No newline at end of file
+ logging.basicConfig(level=logging.INFO)
+ unittest.main()