本文整理汇总了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))
)
示例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()
示例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()
示例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))
))
示例5: setUp
def setUp(self):
BaseTestCase.setUp(self)
self.c1 = constraint.SingleValueConstraint(5)
self.c2 = constraint.ConstraintsUnion(
self.c1, constraint.ValueRangeConstraint(1, 3)
)
示例6: setUp
def setUp(self):
"""Each test precondition
Steps:
1. Click on create environment
"""
BaseTestCase.setUp(self)
Environments().create_cluster_box.click()
示例7: setUpClass
def setUpClass(cls):
"""Global precondition
Steps:
1. Create simple environment with Neutron GRE
"""
BaseTestCase.setUpClass()
preconditions.Environment.simple_neutron_gre()
示例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
示例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()
示例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))
)
)
示例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)
示例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)
)
示例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()
示例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()
示例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)