本文整理匯總了Python中robottelo.cli.partitiontable.PartitionTable.update方法的典型用法代碼示例。如果您正苦於以下問題:Python PartitionTable.update方法的具體用法?Python PartitionTable.update怎麽用?Python PartitionTable.update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類robottelo.cli.partitiontable.PartitionTable
的用法示例。
在下文中一共展示了PartitionTable.update方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_positive_update_name
# 需要導入模塊: from robottelo.cli.partitiontable import PartitionTable [as 別名]
# 或者: from robottelo.cli.partitiontable.PartitionTable import update [as 別名]
def test_positive_update_name(self):
"""Create a Partition Table and update its name
@Feature: Partition Table
@Assert: Partition Table is created and its name can be updated
"""
ptable = make_partition_table()
for new_name in generate_strings_list(length=randint(4, 30)):
with self.subTest(new_name):
PartitionTable.update({
'id': ptable['id'],
'new-name': new_name,
})
ptable = PartitionTable.info({'id': ptable['id']})
self.assertEqual(ptable['name'], new_name)
示例2: test_positive_update_name
# 需要導入模塊: from robottelo.cli.partitiontable import PartitionTable [as 別名]
# 或者: from robottelo.cli.partitiontable.PartitionTable import update [as 別名]
def test_positive_update_name(self):
"""Create a Partition Table and update its name
:id: 6242c915-0f15-4d5f-9f7a-73cb58fac81e
:expectedresults: Partition Table is created and its name can be
updated
:CaseImportance: Critical
"""
ptable = make_partition_table()
for new_name in generate_strings_list(length=randint(4, 30)):
with self.subTest(new_name):
PartitionTable.update({
'id': ptable['id'],
'new-name': new_name,
})
ptable = PartitionTable.info({'id': ptable['id']})
self.assertEqual(ptable['name'], new_name)