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


Python HostCollection.delete方法代码示例

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


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

示例1: test_positive_delete_by_name

# 需要导入模块: from robottelo.cli.hostcollection import HostCollection [as 别名]
# 或者: from robottelo.cli.hostcollection.HostCollection import delete [as 别名]
    def test_positive_delete_by_name(self):
        """Check if host collection can be created and deleted by name

        :id: a841a9f8-4285-40e5-9670-3f379dfd9a1e

        :customerscenario: true

        :expectedresults: Host collection is created and then deleted

        :BZ: 1328925

        :CaseImportance: Critical
        """
        for name in valid_data_list():
            with self.subTest(name):
                new_host_col = make_host_collection({
                    'name': name,
                    'organization-id': self.organization['id'],
                })
                HostCollection.delete({
                    'name': new_host_col['name'],
                    'organization-id': self.organization['id'],
                })
                with self.assertRaises(CLIReturnCodeError):
                    HostCollection.info({'id': new_host_col['id']})
开发者ID:BlackSmith,项目名称:robottelo,代码行数:27,代码来源:test_host_collection.py

示例2: test_positive_delete_by_id

# 需要导入模块: from robottelo.cli.hostcollection import HostCollection [as 别名]
# 或者: from robottelo.cli.hostcollection.HostCollection import delete [as 别名]
    def test_positive_delete_by_id(self):
        """Check if host collection can be created and deleted

        @Feature: Host Collection

        @Assert: Host collection is created and then deleted

        """
        for name in valid_data_list():
            with self.subTest(name):
                new_host_col = self._new_host_collection({"name": name})
                HostCollection.delete({"id": new_host_col["id"], "organization-id": self.org["id"]})
                with self.assertRaises(CLIReturnCodeError):
                    HostCollection.info({"id": new_host_col["id"]})
开发者ID:adammhaile,项目名称:robottelo,代码行数:16,代码来源:test_host_collection.py

示例3: test_positive_delete_1

# 需要导入模块: from robottelo.cli.hostcollection import HostCollection [as 别名]
# 或者: from robottelo.cli.hostcollection.HostCollection import delete [as 别名]
    def test_positive_delete_1(self, test_data):
        """@Test: Check if host collection can be created and deleted

        @Feature: Host Collection

        @Assert: Host collection is created and then deleted

        """

        new_host_col = self._new_host_collection({'name': test_data['name']})
        # Assert that name matches data passed
        self.assertEqual(new_host_col['name'], test_data['name'])

        # Delete it
        result = HostCollection.delete(
            {'id': new_host_col['id'],
             'organization-id': self.org['id']})
        self.assertEqual(result.return_code, 0)
        self.assertEqual(len(result.stderr), 0)

        # Fetch it
        result = HostCollection.info(
            {
                'id': new_host_col['id'],
            }
        )
        self.assertNotEqual(result.return_code, 0)
        self.assertGreater(len(result.stderr), 0)
开发者ID:ares,项目名称:robottelo,代码行数:30,代码来源:test_host_collection.py

示例4: test_positive_delete_1

# 需要导入模块: from robottelo.cli.hostcollection import HostCollection [as 别名]
# 或者: from robottelo.cli.hostcollection.HostCollection import delete [as 别名]
    def test_positive_delete_1(self):
        """@Test: Check if host collection can be created and deleted

        @Feature: Host Collection

        @Assert: Host collection is created and then deleted

        """
        for name in valid_data_list():
            with self.subTest(name):
                new_host_col = self._new_host_collection({'name': name})
                HostCollection.delete({
                    'id': new_host_col['id'],
                    'organization-id': self.org['id'],
                })
                with self.assertRaises(CLIReturnCodeError):
                    HostCollection.info({'id': new_host_col['id']})
开发者ID:lpramuk,项目名称:robottelo,代码行数:19,代码来源:test_host_collection.py

示例5: test_positive_delete_by_id

# 需要导入模块: from robottelo.cli.hostcollection import HostCollection [as 别名]
# 或者: from robottelo.cli.hostcollection.HostCollection import delete [as 别名]
    def test_positive_delete_by_id(self):
        """Check if host collection can be created and deleted

        @id: ef54a26e-a18f-4f29-8ef4-a7124785dbae

        @Assert: Host collection is created and then deleted

        @BZ: 1328925
        """
        for name in valid_data_list():
            with self.subTest(name):
                new_host_col = self._new_host_collection({'name': name})
                HostCollection.delete({
                    'id': new_host_col['id'],
                    'organization-id': self.org['id'],
                })
                with self.assertRaises(CLIReturnCodeError):
                    HostCollection.info({'id': new_host_col['id']})
开发者ID:Ichimonji10,项目名称:robottelo,代码行数:20,代码来源:test_host_collection.py

示例6: test_positive_delete_by_id

# 需要导入模块: from robottelo.cli.hostcollection import HostCollection [as 别名]
# 或者: from robottelo.cli.hostcollection.HostCollection import delete [as 别名]
    def test_positive_delete_by_id(self):
        """Check if host collection can be created and deleted by id

        :id: ef54a26e-a18f-4f29-8ef4-a7124785dbae

        :expectedresults: Host collection is created and then deleted

        :BZ: 1328925

        :CaseImportance: Critical
        """
        for name in valid_data_list():
            with self.subTest(name):
                new_host_col = make_host_collection({
                    'name': name,
                    'organization-id': self.organization['id'],
                })
                HostCollection.delete({
                    'id': new_host_col['id'],
                })
                with self.assertRaises(CLIReturnCodeError):
                    HostCollection.info({'id': new_host_col['id']})
开发者ID:BlackSmith,项目名称:robottelo,代码行数:24,代码来源:test_host_collection.py


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