本文整理汇总了Python中tests.base.BaseTestCase.setUp方法的典型用法代码示例。如果您正苦于以下问题:Python BaseTestCase.setUp方法的具体用法?Python BaseTestCase.setUp怎么用?Python BaseTestCase.setUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tests.base.BaseTestCase
的用法示例。
在下文中一共展示了BaseTestCase.setUp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUp [as 别名]
def setUp(self):
BaseTestCase.setUp(self)
self.o = univ.OctetString(
'Quick brown fox',
tagSet=univ.OctetString.tagSet.tagExplicitly(
tag.Tag(tag.tagClassApplication, tag.tagFormatSimple, 5)
))
示例2: setUp
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUp [as 别名]
def setUp(self):
BaseTestCase.setUp(self)
self.e = namedtype.NamedTypes(
namedtype.NamedType('first-name', univ.OctetString('')),
namedtype.NamedType('age', univ.Integer(0))
)
示例3: setUp
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUp [as 别名]
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))
))
示例4: setUp
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUp [as 别名]
def setUp(self):
BaseTestCase.setUp(self)
self.c1 = constraint.SingleValueConstraint(5)
self.c2 = constraint.ConstraintsUnion(
self.c1, constraint.ValueRangeConstraint(1, 3)
)
示例5: setUp
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUp [as 别名]
def setUp(self):
"""Each test precondition
Steps:
1. Click on create environment
"""
BaseTestCase.setUp(self)
Environments().create_cluster_box.click()
示例6: setUp
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUp [as 别名]
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
示例7: setUp
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUp [as 别名]
def setUp(self):
"""Each test precondition
Steps:
1. Click on create environment
"""
self.clear_nailgun_database()
BaseTestCase.setUp(self)
Environments().create_cluster_box.click()
示例8: setUp
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUp [as 别名]
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))
)
)
示例9: setUp
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUp [as 别名]
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()
示例10: setUp
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUp [as 别名]
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()
示例11: setUp
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUp [as 别名]
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)
)
示例12: setUp
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUp [as 别名]
def setUp(self):
"""Each test precondition
Steps:
1. Create simple environment with default values
2. Click on created environment
"""
BaseTestCase.clear_nailgun_database()
BaseTestCase.setUp(self)
preconditions.Environment.simple_flat()
time.sleep(1)
示例13: setUp
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUp [as 别名]
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)
示例14: setUp
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUp [as 别名]
def setUp(self):
"""Each test precondition
Steps:
1. Click on created environment
2. Select controller node
3. Click Configure Interfaces
"""
BaseTestCase.setUp(self)
Environments().create_cluster_boxes[0].click()
Nodes().nodes[0].details.click()
NodeInfo().edit_networks.click()
示例15: setUp
# 需要导入模块: from tests.base import BaseTestCase [as 别名]
# 或者: from tests.base.BaseTestCase import setUp [as 别名]
def setUp(self):
"""Each test precondition
Steps:
1. Click on created simple environment
2. Click 'Add nodes'
"""
BaseTestCase.setUp(self)
Environments().create_cluster_boxes[0].click()
time.sleep(1)
Nodes().add_nodes.click()
time.sleep(1)