def setUp(self): """ @summary: 初始化测试数据、测试环境。 """ # 初始化测试数据 self.dm = super(self.__class__, self).setUp() self.assertTrue(smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
def setUp(self): ''' @summary: 初始化测试数据、测试环境。 ''' # 初始化测试数据 self.dm = super(self.__class__, self).setUp() self.assertTrue( smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
def setUp(self): """ @summary: 测试用例执行前的环境初始化(前提) """ # 调用父类方法,获取该用例所对应的测试数据模块 self.dm = super(self.__class__, self).setUp() # 前提1: 创建一个集群 LogPrint().info("Pre-Test: Create a cluster '%s' for this TC." % self.dm.cluster_name) self.assertTrue(smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
def setUp(self): """ @summary: 测试用例执行前的环境初始化(前提) """ # 初始化测试数据 self.dm = super(self.__class__, self).setUp() # 前提1:首先创建一个集群 self.assertTrue(smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name)) # 前提2:创建一个主机 self.assertTrue(smart_create_host(self.dm.host_name, self.dm.host_info))
def setUp(self): """ @summary: 初始化测试数据、测试环境。 """ # 初始化测试数据 self.dm = super(self.__class__, self).setUp() # 前提1:创建一个集群 LogPrint().info("Pre-Test: Create cluster '%s' for this TC." % self.dm.cluster_name) self.assertTrue(smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
def setUp(self): """ @summary: 测试用例执行前的环境初始化(前提) """ # 调用父类方法,获取该用例所对应的测试数据模块 self.dm = super(self.__class__, self).setUp() # step1:创建一个集群 LogPrint().info("Pre-Test-1: Create cluster '%s' for this TC." % self.dm.cluster_name) self.assertTrue(smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name)) # step2:创建一个逻辑网络 LogPrint().info("Pre-Test-2: Create network '%s' for this TC." % self.dm.nw_name) self.assertTrue(smart_create_network(self.dm.nw_info, self.dm.nw_name))
def setUp(self): ''' @summary: 测试用例执行前的环境初始化(前提) ''' # 调用父类方法,获取该用例所对应的测试数据模块 self.dm = super(self.__class__, self).setUp() # 前提1: 创建一个集群 LogPrint().info("Pre-Test: Create a cluster '%s' for this TC." % self.dm.cluster_name) self.assertTrue( smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
def setUp(self): ''' @summary: 测试用例执行前的环境初始化(前提) ''' # 初始化测试数据 self.dm = super(self.__class__, self).setUp() # 前提1:首先创建一个集群 self.assertTrue( smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name)) # 前提2:创建一个主机 self.assertTrue(smart_create_host(self.dm.host_name, self.dm.host_info))
def setUp(self): ''' @summary: 初始化测试数据、测试环境。 ''' # 初始化测试数据 self.dm = super(self.__class__, self).setUp() # 前提1:创建一个集群 LogPrint().info("Pre-Test: Create cluster '%s' for this TC." % self.dm.cluster_name) self.assertTrue( smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name))
def setUp(self): ''' @summary: 测试用例执行前的环境初始化(前提) ''' # 调用父类方法,获取该用例所对应的测试数据模块 self.dm = super(self.__class__, self).setUp() #step1:创建一个集群 LogPrint().info("Pre-Test-1: Create cluster '%s' for this TC." % self.dm.cluster_name) self.assertTrue( smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name)) #step2:创建一个逻辑网络 LogPrint().info("Pre-Test-2: Create network '%s' for this TC." % self.dm.nw_name) self.assertTrue(smart_create_network(self.dm.nw_info, self.dm.nw_name))
def setUp(self): """ @summary: 测试用例执行前的环境初始化(前提) """ # 调用父类方法,获取该用例所对应的测试数据模块 self.dm = super(self.__class__, self).setUp() # step1:创建一个集群 LogPrint().info("Pre-Test-1: Create cluster '%s' for this TC." % self.dm.cluster_name) self.assertTrue(smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name)) # step2:创建一个逻辑网络 LogPrint().info("Pre-Test-2: Create network '%s' for this TC." % self.dm.nw_name) self.assertTrue(smart_create_network(self.dm.nw_info, self.dm.nw_name)) # step3:附加该网络到集群上 LogPrint().info( "Pre-Test-3: Attach network '%s'to cluster '%s' for this TC." % (self.dm.nw_name, self.dm.cluster_name) ) self.clusterapi = ClusterAPIs() self.clusterapi.attachNetworkToCluster(self.dm.cluster_name, self.dm.nw_info)
def setUp(self): ''' @summary: 测试用例执行前的环境初始化(前提) ''' # 调用父类方法,获取该用例所对应的测试数据模块 self.dm = super(self.__class__, self).setUp() # step1:创建一个集群 LogPrint().info("Pre-Test-1: Create cluster '%s' for this TC." % self.dm.cluster_name) self.assertTrue( smart_create_cluster(self.dm.cluster_info, self.dm.cluster_name)) # step2:创建一个逻辑网络 LogPrint().info("Pre-Test-2: Create network '%s' for this TC." % self.dm.nw_name) self.assertTrue(smart_create_network(self.dm.nw_info, self.dm.nw_name)) # step3:附加该网络到集群上 LogPrint().info( "Pre-Test-3: Attach network '%s'to cluster '%s' for this TC." % (self.dm.nw_name, self.dm.cluster_name)) self.clusterapi = ClusterAPIs() self.clusterapi.attachNetworkToCluster(self.dm.cluster_name, self.dm.nw_info)