本文整理汇总了Python中tests.base.BaseTestCase.setUpClass方法的典型用法代码示例。如果您正苦于以下问题:Python BaseTestCase.setUpClass方法的具体用法?Python BaseTestCase.setUpClass怎么用?Python BaseTestCase.setUpClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tests.base.BaseTestCase
的用法示例。
在下文中一共展示了BaseTestCase.setUpClass方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUpClass
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUpClass [as 别名]
def setUpClass(cls):
"""Global precondition
Steps:
1. Create simple environment with default values
2. Add one controller node
3. Add other nodes as compute
"""
BaseTestCase.setUpClass()
BaseTestCase.get_home()
preconditions.Environment().simple_flat()
Environments().create_cluster_boxes[0].click()
time.sleep(1)
# Add controller
Nodes().add_nodes.click()
time.sleep(1)
Nodes().nodes_discovered[0].checkbox.click()
RolesPanel().controller.click()
Nodes().apply_changes.click()
time.sleep(1)
# Add other discovered nodes as compute
Nodes().add_nodes.click()
time.sleep(1)
for n in Nodes().nodes_discovered:
n.checkbox.click()
RolesPanel().compute.click()
Nodes().apply_changes.click()
示例2: setUpClass
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUpClass [as 别名]
def setUpClass(cls):
"""Global precondition
Steps:
1. Create simple environment with Neutron GRE
"""
BaseTestCase.setUpClass()
preconditions.Environment.simple_neutron_gre()
示例3: setUpClass
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUpClass [as 别名]
def setUpClass(cls):
BaseTestCase.setUpClass()
preconditions.Environment.simple_flat()
Environments().create_cluster_boxes[0].click()
Nodes().add_nodes.click()
Nodes().nodes_discovered[0].checkbox.click()
RolesPanel().controller.click()
Nodes().apply_changes.click()
time.sleep(1)
示例4: setUpClass
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUpClass [as 别名]
def setUpClass(cls):
"""Global precondition
Steps:
1. Create simple environment with default values
2. Add one controller node
"""
BaseTestCase.setUpClass()
preconditions.Environment.simple_flat()
time.sleep(1)
Nodes().add_nodes.click()
time.sleep(1)
Nodes().nodes_discovered[0].checkbox.click()
RolesPanel().controller.click()
Nodes().apply_changes.click()
示例5: setUpClass
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUpClass [as 别名]
def setUpClass(cls):
"""Global precondition
Steps:
1. Create simple environment with default values
2. Click on created environment and open networks tab
3. Select VLAN Manager and save settings
"""
BaseTestCase.setUpClass()
preconditions.Environment.simple_flat()
Tabs().networks.click()
with Networks() as n:
n.vlan_manager.click()
n.save_settings.click()
time.sleep(1)
示例6: setUpClass
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUpClass [as 别名]
def setUpClass(cls):
"""Global precondition
Steps:
1. Create simple environment with Neutron with GRE segmentation
"""
BaseTestCase.setUpClass()
cls.get_home()
Environments().create_cluster_box.click()
with Wizard() as w:
w.name.send_keys(OPENSTACK_CENTOS)
w.release.select_by_visible_text(OPENSTACK_RELEASE_CENTOS)
for i in range(3):
w.next.click()
w.network_neutron_gre.click()
for i in range(3):
w.next.click()
w.create.click()
w.wait_until_exists()