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


Python base.BaseTestCase类代码示例

本文整理汇总了Python中tests.base.BaseTestCase的典型用法代码示例。如果您正苦于以下问题:Python BaseTestCase类的具体用法?Python BaseTestCase怎么用?Python BaseTestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了BaseTestCase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setUp

    def setUp(self):
        BaseTestCase.setUp(self)

        self.e = namedtype.NamedTypes(
            namedtype.NamedType('first-name', univ.OctetString('')),
            namedtype.NamedType('age', univ.Integer(0))
        )
开发者ID:catapult-project,项目名称:catapult,代码行数:7,代码来源:test_namedtype.py

示例2: setUpClass

    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,代码行数:29,代码来源:test_adding_nodes.py

示例3: setUp

 def setUp(self):
     BaseTestCase.setUp(self)
     self.s = univ.SequenceOf(
         componentType=univ.OctetString().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 3))
     )
     self.s.setComponentByPosition(0, 'q')
     self.s2 = univ.SequenceOf()
开发者ID:luke-chang,项目名称:gecko-1,代码行数:7,代码来源:test_decoder.py

示例4: setUp

 def setUp(self):
     BaseTestCase.setUp(self)
     self.s = univ.Set(componentType=namedtype.NamedTypes(
         namedtype.NamedType('place-holder', univ.Null('')),
         namedtype.OptionalNamedType('first-name', univ.OctetString()),
         namedtype.DefaultedNamedType('age', univ.Integer(33))
     ))
开发者ID:luke-chang,项目名称:gecko-1,代码行数:7,代码来源:test_encoder.py

示例5: setUp

    def setUp(self):
        BaseTestCase.setUp(self)

        self.c1 = constraint.SingleValueConstraint(5)

        self.c2 = constraint.ConstraintsUnion(
            self.c1, constraint.ValueRangeConstraint(1, 3)
        )
开发者ID:luke-chang,项目名称:gecko-1,代码行数:8,代码来源:test_constraint.py

示例6: setUp

    def setUp(self):
        """Each test precondition

        Steps:
            1. Click on create environment
        """
        BaseTestCase.setUp(self)
        Environments().create_cluster_box.click()
开发者ID:Fiware,项目名称:ops.Fuel-main-dev,代码行数:8,代码来源:test_env_wizard.py

示例7: setUpClass

    def setUpClass(cls):
        """Global precondition

        Steps:
            1. Create simple environment with Neutron GRE
        """
        BaseTestCase.setUpClass()
        preconditions.Environment.simple_neutron_gre()
开发者ID:Axam,项目名称:fuel-main,代码行数:8,代码来源:test_networks.py

示例8: setUp

    def setUp(self):
        BaseTestCase.setUp(self)
        self.s = univ.Sequence(
            componentType=namedtype.NamedTypes(
                namedtype.NamedType('number', univ.Boolean().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
            )
        )

        self.s[0] = True
开发者ID:catapult-project,项目名称:catapult,代码行数:9,代码来源:test_encoder.py

示例9: setUp

    def setUp(self):
        """Each test precondition

        Steps:
            1. Click on create environment
        """
        self.clear_nailgun_database()
        BaseTestCase.setUp(self)
        Environments().create_cluster_box.click()
开发者ID:Axam,项目名称:fuel-main,代码行数:9,代码来源:test_environment.py

示例10: setUp

 def setUp(self):
     BaseTestCase.setUp(self)
     self.s1 = univ.Sequence(
         componentType=namedtype.NamedTypes(
             namedtype.NamedType('name', univ.OctetString('')),
             namedtype.OptionalNamedType('nick', univ.OctetString('')),
             namedtype.DefaultedNamedType('age', univ.Integer(34))
         )
     )
开发者ID:luke-chang,项目名称:gecko-1,代码行数:9,代码来源:test_univ.py

示例11: setUpClass

 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,代码行数:9,代码来源:test_configure_networks.py

示例12: setUp

    def setUp(self):
        BaseTestCase.setUp(self)

        self.ts1 = tag.initTagSet(
            tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 12)
        )

        self.ts2 = tag.initTagSet(
            tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 12)
        )
开发者ID:catapult-project,项目名称:catapult,代码行数:10,代码来源:test_tag.py

示例13: setUp

    def setUp(self):
        """Each test precondition

        Steps:
            1. Click on created environment
            2. Open Settings tab
        """
        BaseTestCase.setUp(self)
        Environments().create_cluster_boxes[0].click()
        Tabs().settings.click()
开发者ID:Fiware,项目名称:ops.Fuel-main-dev,代码行数:10,代码来源:test_env_settings.py

示例14: setUp

    def setUp(self):
        BaseTestCase.setUp(self)

        class Sequence(univ.Sequence):
            componentType = namedtype.NamedTypes(
                namedtype.NamedType('id', univ.Integer()),
                namedtype.NamedType('blob', univ.Any())
            )

        self.s = Sequence()
开发者ID:etingof,项目名称:pyasn1,代码行数:10,代码来源:test_opentype.py

示例15: setUp

    def setUp(self):
        """Each test precondition

        Steps:
            1. Open Support page
        """
        BaseTestCase.clear_nailgun_database()
        BaseTestCase.setUp(self)
        time.sleep(1)
        Header().support.click()
        time.sleep(1)
开发者ID:Fiware,项目名称:ops.Fuel-main-dev,代码行数:11,代码来源:test_support.py


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