当前位置: 首页>>代码示例>>Python>>正文


Python BaseTestCase.setUpClass方法代码示例

本文整理汇总了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()
开发者ID:Axam,项目名称:fuel-main,代码行数:31,代码来源:test_adding_nodes.py

示例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()
开发者ID:Axam,项目名称:fuel-main,代码行数:10,代码来源:test_networks.py

示例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)
开发者ID:piousbox,项目名称:fuel-main,代码行数:11,代码来源:test_configure_networks.py

示例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()
开发者ID:Fiware,项目名称:ops.Fuel-main-dev,代码行数:17,代码来源:test_configure_networks.py

示例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)
开发者ID:Fiware,项目名称:ops.Fuel-main-dev,代码行数:17,代码来源:test_networks.py

示例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()
开发者ID:Fiware,项目名称:ops.Fuel-main-dev,代码行数:21,代码来源:test_env_settings.py


注:本文中的tests.base.BaseTestCase.setUpClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。