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


Python Catalog.delete方法代码示例

本文整理汇总了Python中cfme.services.catalogs.catalog.Catalog.delete方法的典型用法代码示例。如果您正苦于以下问题:Python Catalog.delete方法的具体用法?Python Catalog.delete怎么用?Python Catalog.delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cfme.services.catalogs.catalog.Catalog的用法示例。


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

示例1: test_catalog_crud

# 需要导入模块: from cfme.services.catalogs.catalog import Catalog [as 别名]
# 或者: from cfme.services.catalogs.catalog.Catalog import delete [as 别名]
def test_catalog_crud():
    cat = Catalog(name=fauxfactory.gen_alphanumeric(),
                  description="my catalog")
    cat.create()
    with update(cat):
        cat.description = "my edited description"
    cat.delete()
开发者ID:dajohnso,项目名称:cfme_tests,代码行数:9,代码来源:test_catalog.py

示例2: test_catalog_duplicate_name

# 需要导入模块: from cfme.services.catalogs.catalog import Catalog [as 别名]
# 或者: from cfme.services.catalogs.catalog.Catalog import delete [as 别名]
def test_catalog_duplicate_name():
    cat = Catalog(name=fauxfactory.gen_alphanumeric(),
                  description="my catalog")
    cat.create()
    with error.expected("Name has already been taken"):
        cat.create()
    cat.delete()
开发者ID:dajohnso,项目名称:cfme_tests,代码行数:9,代码来源:test_catalog.py

示例3: test_catalog_duplicate_name

# 需要导入模块: from cfme.services.catalogs.catalog import Catalog [as 别名]
# 或者: from cfme.services.catalogs.catalog.Catalog import delete [as 别名]
def test_catalog_duplicate_name():
    cat = Catalog(name=rand.generate_random_string(),
                  description="my catalog")
    cat.create()
    with error.expected("Name has already been taken"):
        cat.create()
    cat.delete()
开发者ID:petrblaho,项目名称:cfme_tests,代码行数:9,代码来源:test_catalog.py

示例4: test_catalog_crud

# 需要导入模块: from cfme.services.catalogs.catalog import Catalog [as 别名]
# 或者: from cfme.services.catalogs.catalog.Catalog import delete [as 别名]
def test_catalog_crud():
    cat = Catalog(name=rand.generate_random_string(),
                  description="my catalog")
    cat.create()
    with update(cat):
        cat.description = "my edited description"
    cat.delete()
开发者ID:petrblaho,项目名称:cfme_tests,代码行数:9,代码来源:test_catalog.py

示例5: catalog

# 需要导入模块: from cfme.services.catalogs.catalog import Catalog [as 别名]
# 或者: from cfme.services.catalogs.catalog.Catalog import delete [as 别名]
def catalog():
    cat_name = "cat_{}".format(fauxfactory.gen_alphanumeric())
    catalog = Catalog(name=cat_name, description="my catalog")
    catalog.create()
    yield catalog
    if catalog.exists:
        catalog.delete()
开发者ID:akarol,项目名称:cfme_tests,代码行数:9,代码来源:test_provision_stack.py

示例6: catalog

# 需要导入模块: from cfme.services.catalogs.catalog import Catalog [as 别名]
# 或者: from cfme.services.catalogs.catalog.Catalog import delete [as 别名]
def catalog(ansible_catalog_item):
    catalog_ = Catalog(fauxfactory.gen_alphanumeric(), items=[ansible_catalog_item.name])
    catalog_.create()
    ansible_catalog_item.catalog = catalog_
    yield catalog_

    if catalog_.exists:
        catalog_.delete()
        ansible_catalog_item.catalog = None
开发者ID:jkandasa,项目名称:integration_tests,代码行数:11,代码来源:test_embedded_ansible_services.py

示例7: catalog

# 需要导入模块: from cfme.services.catalogs.catalog import Catalog [as 别名]
# 或者: from cfme.services.catalogs.catalog.Catalog import delete [as 别名]
def catalog():
    catalog = "cat_" + fauxfactory.gen_alphanumeric()
    cat = Catalog(name=catalog, description="my catalog")
    try:
        cat.create()
        yield cat
    finally:
        if cat.exists:
            cat.delete()
开发者ID:quarckster,项目名称:cfme_tests,代码行数:11,代码来源:service_fixtures.py

示例8: catalog

# 需要导入模块: from cfme.services.catalogs.catalog import Catalog [as 别名]
# 或者: from cfme.services.catalogs.catalog.Catalog import delete [as 别名]
def catalog():
    catalog_name = "test_cat_" + fauxfactory.gen_alphanumeric()
    cat = Catalog(name=catalog_name,
                  description="my catalog")
    cat.create()
    yield cat

    # fixture cleanup
    try:
        cat.delete()
    except NoSuchElementException:
        logger.warning('test_catalog_item: catalog yield fixture cleanup, catalog "{}" not '
                       'found'.format(catalog_name))
开发者ID:RonnyPfannschmidt,项目名称:cfme_tests,代码行数:15,代码来源:test_catalog_item.py

示例9: test_permissions_catalog_add

# 需要导入模块: from cfme.services.catalogs.catalog import Catalog [as 别名]
# 或者: from cfme.services.catalogs.catalog.Catalog import delete [as 别名]
def test_permissions_catalog_add(appliance):
    """ Tests that a catalog can be added only with the right permissions"""
    cat = Catalog(name=fauxfactory.gen_alphanumeric(),
                  description="my catalog")

    test_product_features = [['Everything', 'Services', 'Catalogs Explorer', 'Catalogs']]

    # Since we try to create the catalog with the same name, we obliged to delete it after creation
    # in order to avoid "Name has already been taken" error which makes this test "blind" to the
    # fact, that disallowed action actually can be performed.
    # TODO: remove this workaround with "lambda"
    test_actions = {'Add Catalog': lambda _: cat.create(),
                    'Delete Catalog': lambda _: cat.delete()}

    tac.single_task_permission_test(appliance, test_product_features, test_actions)
开发者ID:akarol,项目名称:cfme_tests,代码行数:17,代码来源:test_catalog.py

示例10: catalog

# 需要导入模块: from cfme.services.catalogs.catalog import Catalog [as 别名]
# 或者: from cfme.services.catalogs.catalog.Catalog import delete [as 别名]
def catalog():
    cat_name = "cat_" + fauxfactory.gen_alphanumeric()
    catalog = Catalog(name=cat_name, description="my catalog")
    catalog.create()
    yield catalog
    catalog.delete()
开发者ID:pombredanne,项目名称:cfme_tests,代码行数:8,代码来源:test_provision_stack.py


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