예제 #1
0
    def test_positive_update_description(self):
        """Update existing Host Collection entity description

        @id: 5ef92657-489f-46a2-9b3a-e40322ca86d8

        @Assert: Host Collection is updated
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(
                session,
                name=name,
                org=self.organization.name,
                description=gen_string('alpha'),
            )
            self.assertIsNotNone(self.hostcollection.search(name))
            for new_desc in valid_data_list():
                with self.subTest(new_desc):
                    self.hostcollection.update(name, description=new_desc)
                    self.assertIsNotNone(
                        self.hostcollection.wait_until_element(
                            common_locators['alert.success_sub_form'])
                    )
                    self.assertTrue(self.hostcollection.validate_field_value(
                        name, 'description', new_desc))
예제 #2
0
    def test_positive_add_host(self):
        """Check if host can be added to Host Collection

        @id: 80824c9f-15a1-4f76-b7ac-7d9ca9f6ed9e

        @Assert: Host is added to Host Collection successfully

        @CaseLevel: System
        """
        name = gen_string('alpha')
        cv = entities.ContentView(organization=self.organization).create()
        lce = entities.LifecycleEnvironment(
            organization=self.organization).create()
        cv.publish()
        promote(cv.read().version[0], lce.id)
        new_system = make_fake_host({
            u'content-view-id': cv.id,
            u'lifecycle-environment-id': lce.id,
            u'name': gen_string('alpha'),
            u'organization-id': self.organization.id,
        })
        with Session(self.browser) as session:
            make_host_collection(
                session, org=self.organization.name, name=name)
            self.hostcollection.add_host(name, new_system['name'])
예제 #3
0
    def test_positive_create_with_limit(self):
        """Create Host Collection with finite content hosts limit

        @id: 9983b61d-f820-4b60-ae5e-a45925f2dcf0

        @Assert: Host Collection is created
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(
                session, name=name, org=self.organization.name, limit='10')
            self.assertIsNotNone(self.hostcollection.search(name))
예제 #4
0
    def test_positive_create_with_limit(self):
        """Create Host Collection with finite content hosts limit

        @Feature: Host Collection - Positive Create

        @Assert: Host Collection is created
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(
                session, name=name, org=self.organization.name, limit='10')
            self.assertIsNotNone(self.hostcollection.search(name))
예제 #5
0
    def test_positive_create_with_name(self):
        """Create Host Collection for all name variations

        @Feature: Host Collection - Positive Create

        @Assert: Host Collection is created
        """
        with Session(self.browser) as session:
            for name in valid_data_list():
                with self.subTest(name):
                    make_host_collection(
                        session, org=self.organization.name, name=name)
                    self.assertIsNotNone(self.hostcollection.search(name))
예제 #6
0
    def test_positive_create_with_name(self):
        """Create Host Collection for all name variations

        @id: 267bd784-1ef7-4270-a264-6f8659e239fd

        @Assert: Host Collection is created
        """
        with Session(self.browser) as session:
            for name in valid_data_list():
                with self.subTest(name):
                    make_host_collection(
                        session, org=self.organization.name, name=name)
                    self.assertIsNotNone(self.hostcollection.search(name))
예제 #7
0
    def test_positive_delete(self):
        """Create Host Collection and delete it for all variations of name

        @id: 978a985c-29f4-4b1f-8c68-8cd412af21e6

        @Assert: Host Collection is deleted
        """
        with Session(self.browser) as session:
            for name in valid_data_list():
                with self.subTest(name):
                    make_host_collection(
                        session, name=name, org=self.organization.name)
                    self.assertIsNotNone(self.hostcollection.search(name))
                    self.hostcollection.delete(name)
    def test_positive_create_with_limit(self):
        """Create Host Collection with finite content hosts limit

        :id: 9983b61d-f820-4b60-ae5e-a45925f2dcf0

        :expectedresults: Host Collection is created

        :CaseImportance: Critical
        """
        name = gen_string('alpha')
        with Session(self) as session:
            make_host_collection(
                session, name=name, org=self.organization.name, limit='10')
            self.assertIsNotNone(self.hostcollection.search(name))
예제 #9
0
    def test_positive_delete(self):
        """Create Host Collection and delete it for all variations of name

        @Feature: Host Collection - Positive Delete

        @Assert: Host Collection is deleted
        """
        with Session(self.browser) as session:
            for name in valid_data_list():
                with self.subTest(name):
                    make_host_collection(
                        session, name=name, org=self.organization.name)
                    self.assertIsNotNone(self.hostcollection.search(name))
                    self.hostcollection.delete(name)
예제 #10
0
    def test_positive_create_with_name(self):
        """Create Host Collection for all name variations

        :id: 267bd784-1ef7-4270-a264-6f8659e239fd

        :expectedresults: Host Collection is created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for name in valid_data_list():
                with self.subTest(name):
                    make_host_collection(
                        session, org=self.organization.name, name=name)
                    self.assertIsNotNone(self.hostcollection.search(name))
예제 #11
0
    def test_positive_create_with_description(self):
        """Create Host Collection with valid description

        @Feature: Host Collection - Positive Create

        @Assert: Host Collection is created
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(
                session,
                name=name,
                org=self.organization.name,
                description=gen_string('alphanumeric'),
            )
            self.assertIsNotNone(self.hostcollection.search(name))
예제 #12
0
    def test_positive_create_with_name(self):
        """Create Host Collection for all name variations

        :id: 267bd784-1ef7-4270-a264-6f8659e239fd

        :expectedresults: Host Collection is created

        :CaseImportance: Critical
        """
        with Session(self.browser) as session:
            for name in valid_data_list():
                with self.subTest(name):
                    make_host_collection(session,
                                         org=self.organization.name,
                                         name=name)
                    self.assertIsNotNone(self.hostcollection.search(name))
예제 #13
0
    def test_positive_delete(self):
        """Create Host Collection and delete it for all variations of name

        :id: 978a985c-29f4-4b1f-8c68-8cd412af21e6

        :expectedresults: Host Collection is deleted

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for name in valid_data_list():
                with self.subTest(name):
                    make_host_collection(
                        session, name=name, org=self.organization.name)
                    self.assertIsNotNone(self.hostcollection.search(name))
                    self.hostcollection.delete(name)
예제 #14
0
    def test_positive_create_with_description(self):
        """Create Host Collection with valid description

        @id: 830ff39e-0d4c-4368-bc47-12b060a09410

        @Assert: Host Collection is created
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(
                session,
                name=name,
                org=self.organization.name,
                description=gen_string('alphanumeric'),
            )
            self.assertIsNotNone(self.hostcollection.search(name))
예제 #15
0
    def test_negative_update_limit(self):
        """Update Host Collection with invalid Content Host Limit

        @id: 3f3749f9-cf52-4897-993f-804def785510

        @Assert: Host Collection is not updated.  Appropriate error shown.
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(
                session, name=name, org=self.organization.name)
            self.assertIsNotNone(self.hostcollection.search(name))
            for limit in ' ', -1, 'text', '0':
                with self.subTest(limit):
                    with self.assertRaises(ValueError):
                        self.hostcollection.update(name, limit=limit)
예제 #16
0
    def test_positive_create_with_limit(self):
        """Create Host Collection with finite content hosts limit

        :id: 9983b61d-f820-4b60-ae5e-a45925f2dcf0

        :expectedresults: Host Collection is created

        :CaseImportance: Critical
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(session,
                                 name=name,
                                 org=self.organization.name,
                                 limit='10')
            self.assertIsNotNone(self.hostcollection.search(name))
예제 #17
0
    def test_negative_update_limit(self):
        """Update Host Collection with invalid Content Host Limit

        @id: 3f3749f9-cf52-4897-993f-804def785510

        @Assert: Host Collection is not updated.  Appropriate error shown.
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(session,
                                 name=name,
                                 org=self.organization.name)
            self.assertIsNotNone(self.hostcollection.search(name))
            for limit in ' ', -1, 'text', '0':
                with self.subTest(limit):
                    with self.assertRaises(ValueError):
                        self.hostcollection.update(name, limit=limit)
예제 #18
0
    def test_positive_update_name(self):
        """Update existing Host Collection name

        @id: 9df33661-7a9c-40d9-8f2c-52e5ed21c156

        @Assert: Host Collection is updated
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(
                session, name=name, org=self.organization.name)
            self.assertIsNotNone(self.hostcollection.search(name))
            for new_name in valid_data_list():
                with self.subTest(new_name):
                    self.hostcollection.update(name, new_name=new_name)
                    self.assertIsNotNone(self.hostcollection.search(new_name))
                    name = new_name
예제 #19
0
    def test_negative_create_with_name(self):
        """Create Host Collections with invalid name

        @id: 04e36c46-7577-4308-b9bb-4ec74549d9d3

        @Assert: Host Collection is not created and appropriate error message
        thrown
        """
        with Session(self.browser) as session:
            for name in invalid_values_list('ui'):
                with self.subTest(name):
                    make_host_collection(session,
                                         org=self.organization.name,
                                         name=name)
                    self.assertIsNotNone(
                        self.hostcollection.wait_until_element(
                            common_locators['common_invalid']))
예제 #20
0
    def test_positive_update_limit(self):
        """Update Content Host limit from Unlimited to a finite number

        @id: 6f5015c4-06c9-4873-806e-5f9d39c9d8a8

        @Assert: Host Collection is updated
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(
                session, name=name, org=self.organization.name)
            self.assertIsNotNone(self.hostcollection.search(name))
            self.hostcollection.update(name, limit='25')
            self.assertIsNotNone(self.hostcollection.wait_until_element(
                common_locators['alert.success_sub_form']))
            self.assertTrue(self.hostcollection.validate_field_value(
                name, 'limit', '25'))
예제 #21
0
    def test_positive_delete(self):
        """Create Host Collection and delete it for all variations of name

        :id: 978a985c-29f4-4b1f-8c68-8cd412af21e6

        :expectedresults: Host Collection is deleted

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for name in valid_data_list():
                with self.subTest(name):
                    make_host_collection(session,
                                         name=name,
                                         org=self.organization.name)
                    self.assertIsNotNone(self.hostcollection.search(name))
                    self.hostcollection.delete(name)
예제 #22
0
    def test_positive_update_limit_to_unlimited(self):
        """Update Content Host limit from definite number to Unlimited

        @id: 823acd9e-1259-47b6-8236-7547ef3fff98

        @Assert: Host Collection is updated
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(
                session, name=name, org=self.organization.name, limit='15')
            self.assertIsNotNone(self.hostcollection.search(name))
            self.hostcollection.update(name, limit='Unlimited')
            self.assertIsNotNone(self.hostcollection.wait_until_element(
                common_locators['alert.success_sub_form']))
            self.assertTrue(self.hostcollection.validate_field_value(
                name, 'limit', 'Unlimited'))
예제 #23
0
    def test_positive_copy(self):
        """Create Host Collection and copy it

        @id: af8d968c-8241-40dc-b92c-81965f470191

        @Assert: Host Collection copy exists
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(session,
                                 name=name,
                                 org=self.organization.name)
            self.assertIsNotNone(self.hostcollection.search(name))
            for new_name in valid_data_list():
                with self.subTest(new_name):
                    self.hostcollection.copy(name, new_name)
                    self.assertIsNotNone(self.hostcollection.search(new_name))
예제 #24
0
    def test_positive_copy(self):
        """@Test: Create Host Collection and copy it

        @Feature: Host Collection - Positive Copy

        @Assert: Host Collection copy exists
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(
                session, name=name, org=self.organization.name)
            self.assertIsNotNone(self.hostcollection.search(name))
            for new_name in valid_data_list():
                with self.subTest(new_name):
                    self.hostcollection.copy(name, new_name)
                    self.assertIsNotNone(
                        self.hostcollection.search(new_name))
예제 #25
0
    def test_positive_update_limit_to_unlimited(self):
        """Update Content Host limit from definite number to Unlimited

        @id: 823acd9e-1259-47b6-8236-7547ef3fff98

        @Assert: Host Collection is updated
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(
                session, name=name, org=self.organization.name, limit='15')
            self.assertIsNotNone(self.hostcollection.search(name))
            self.hostcollection.update(name, limit='Unlimited')
            self.assertIsNotNone(self.hostcollection.wait_until_element(
                common_locators['alert.success_sub_form']))
            self.assertTrue(self.hostcollection.validate_field_value(
                name, 'limit', 'Unlimited'))
예제 #26
0
    def test_positive_update_name(self):
        """Update existing Host Collection name

        @id: 9df33661-7a9c-40d9-8f2c-52e5ed21c156

        @Assert: Host Collection is updated
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(
                session, name=name, org=self.organization.name)
            self.assertIsNotNone(self.hostcollection.search(name))
            for new_name in valid_data_list():
                with self.subTest(new_name):
                    self.hostcollection.update(name, new_name=new_name)
                    self.assertIsNotNone(self.hostcollection.search(new_name))
                    name = new_name
예제 #27
0
    def test_positive_update_limit(self):
        """Update Content Host limit from Unlimited to a finite number

        @id: 6f5015c4-06c9-4873-806e-5f9d39c9d8a8

        @Assert: Host Collection is updated
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(
                session, name=name, org=self.organization.name)
            self.assertIsNotNone(self.hostcollection.search(name))
            self.hostcollection.update(name, limit='25')
            self.assertIsNotNone(self.hostcollection.wait_until_element(
                common_locators['alert.success_sub_form']))
            self.assertTrue(self.hostcollection.validate_field_value(
                name, 'limit', '25'))
예제 #28
0
    def test_positive_copy(self):
        """Create Host Collection and copy it

        @id: af8d968c-8241-40dc-b92c-81965f470191

        @Assert: Host Collection copy exists
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(
                session, name=name, org=self.organization.name)
            self.assertIsNotNone(self.hostcollection.search(name))
            for new_name in valid_data_list():
                with self.subTest(new_name):
                    self.hostcollection.copy(name, new_name)
                    self.assertIsNotNone(
                        self.hostcollection.search(new_name))
예제 #29
0
    def test_negative_create_with_name(self):
        """Create Host Collections with invalid name

        @id: 04e36c46-7577-4308-b9bb-4ec74549d9d3

        @Assert: Host Collection is not created and appropriate error message
        thrown
        """
        with Session(self.browser) as session:
            for name in invalid_values_list('ui'):
                with self.subTest(name):
                    make_host_collection(
                        session, org=self.organization.name, name=name)
                    self.assertIsNotNone(
                        self.hostcollection.wait_until_element(
                            common_locators['common_invalid'])
                    )
예제 #30
0
    def test_positive_create_with_description(self):
        """Create Host Collection with valid description

        :id: 830ff39e-0d4c-4368-bc47-12b060a09410

        :expectedresults: Host Collection is created

        :CaseImportance: Critical
        """
        name = gen_string('alpha')
        with Session(self) as session:
            make_host_collection(
                session,
                name=name,
                org=self.organization.name,
                description=gen_string('alphanumeric'),
            )
            self.assertIsNotNone(self.hostcollection.search(name))
예제 #31
0
    def test_positive_create_with_description(self):
        """Create Host Collection with valid description

        :id: 830ff39e-0d4c-4368-bc47-12b060a09410

        :expectedresults: Host Collection is created

        :CaseImportance: Critical
        """
        name = gen_string('alpha')
        with Session(self) as session:
            make_host_collection(
                session,
                name=name,
                org=self.organization.name,
                description=gen_string('alphanumeric'),
            )
            self.assertIsNotNone(self.hostcollection.search(name))
예제 #32
0
    def test_negative_update_name(self):
        """Update existing Host Collection entity name with invalid value

        @id: 7af999e8-5189-45c0-a92d-8c05b03f556a

        @Assert: Host Collection is not updated.  Appropriate error shown.
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(session,
                                 name=name,
                                 org=self.organization.name)
            self.assertIsNotNone(self.hostcollection.search(name))
            for new_name in invalid_names_list():
                with self.subTest(new_name):
                    self.hostcollection.update(name, new_name=new_name)
                    self.assertIsNotNone(
                        self.hostcollection.wait_until_element(
                            common_locators['alert.error_sub_form']))
예제 #33
0
    def test_negative_update_name(self):
        """Update existing Host Collection entity name with invalid value

        @id: 7af999e8-5189-45c0-a92d-8c05b03f556a

        @Assert: Host Collection is not updated.  Appropriate error shown.
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(
                session, name=name, org=self.organization.name)
            self.assertIsNotNone(self.hostcollection.search(name))
            for new_name in invalid_names_list():
                with self.subTest(new_name):
                    self.hostcollection.update(name, new_name=new_name)
                    self.assertIsNotNone(
                        self.hostcollection.wait_until_element(
                            common_locators['alert.error_sub_form'])
                    )
예제 #34
0
    def test_negative_copy(self):
        """Create Host Collection and copy it. Use invalid values for copy name

        @id: 99d47520-c09a-4fbc-8e53-a4e889af0187

        @Assert: Host Collection copy does not exist
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(session,
                                 name=name,
                                 org=self.organization.name)
            self.assertIsNotNone(self.hostcollection.search(name))
            for new_name in invalid_names_list():
                with self.subTest(new_name):
                    self.hostcollection.copy(name, new_name)
                    self.assertIsNotNone(
                        self.hostcollection.wait_until_element(
                            common_locators['alert.error_sub_form']))
예제 #35
0
    def test_negative_copy(self):
        """Create Host Collection and copy it. Use invalid values for copy name

        @id: 99d47520-c09a-4fbc-8e53-a4e889af0187

        @Assert: Host Collection copy does not exist
        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_host_collection(
                session, name=name, org=self.organization.name)
            self.assertIsNotNone(self.hostcollection.search(name))
            for new_name in invalid_names_list():
                with self.subTest(new_name):
                    self.hostcollection.copy(name, new_name)
                    self.assertIsNotNone(
                        self.hostcollection.wait_until_element(
                            common_locators['alert.error_sub_form'])
                    )
예제 #36
0
    def test_negative_create_with_invalid_limit(self):
        """Create Host Collections with invalid Content Host Limit value. Both
        with too long numbers and using letters.

        @id: c15b3540-809e-4339-ad5f-1ab488244299

        @Assert: Host Collection is not created. Appropriate error shown.
        """
        with Session(self.browser) as session:
            for limit in invalid_names_list():
                with self.subTest(limit):
                    make_host_collection(
                        session,
                        name=gen_string('alpha'),
                        org=self.organization.name,
                        limit=limit,
                    )
                    self.assertIsNotNone(
                        self.hostcollection.wait_until_element(
                            common_locators['invalid_limit']))
예제 #37
0
    def test_negative_hosts_limit(self):
        """Check that Host limit actually limits usage

        @id: 57b70977-2110-47d9-be3b-461ad15c70c7

        @Steps:
        1. Create Host Collection entity that can contain only one Host (using
        Host Limit field)
        2. Create Host and add it to Host Collection. Check that it was added
        successfully
        3. Create one more Host and try to add it to Host Collection
        4. Check that expected error is shown

        @Assert: Second host is not added to Host Collection and appropriate
        error is shown

        @CaseLevel: System
        """
        name = gen_string('alpha')
        org = entities.Organization().create()
        cv = entities.ContentView(organization=org).create()
        lce = entities.LifecycleEnvironment(organization=org).create()
        cv.publish()
        promote(cv.read().version[0], lce.id)
        new_systems = [
            make_fake_host({
                u'content-view-id': cv.id,
                u'lifecycle-environment-id': lce.id,
                u'name': gen_string('alpha'),
                u'organization-id': org.id,
            })['name']
            for _ in range(2)
        ]
        with Session(self.browser) as session:
            make_host_collection(
                session, org=org.name, name=name, limit='1')
            self.hostcollection.add_host(name, new_systems[0])
            with self.assertRaises(UIError):
                self.hostcollection.add_host(name, new_systems[1])
            self.assertIsNotNone(self.hostcollection.wait_until_element(
                common_locators['alert.error_sub_form']))
예제 #38
0
    def test_negative_hosts_limit(self):
        """Check that Host limit actually limits usage

        :id: 57b70977-2110-47d9-be3b-461ad15c70c7

        :Steps:
            1. Create Host Collection entity that can contain only one Host
                (using Host Limit field)
            2. Create Host and add it to Host Collection. Check that it was
                added successfully
            3. Create one more Host and try to add it to Host Collection
            4. Check that expected error is shown

        :expectedresults: Second host is not added to Host Collection and
            appropriate error is shown

        :CaseLevel: System
        """
        name = gen_string('alpha')
        org = entities.Organization().create()
        cv = entities.ContentView(organization=org).create()
        lce = entities.LifecycleEnvironment(organization=org).create()
        cv.publish()
        promote(cv.read().version[0], lce.id)
        new_systems = [
            make_fake_host({
                u'content-view-id': cv.id,
                u'lifecycle-environment-id': lce.id,
                u'name': gen_string('alpha'),
                u'organization-id': org.id,
            })['name']
            for _ in range(2)
        ]
        with Session(self.browser) as session:
            make_host_collection(
                session, org=org.name, name=name, limit='1')
            self.hostcollection.add_host(name, new_systems[0])
            with self.assertRaises(UIError):
                self.hostcollection.add_host(name, new_systems[1])
            self.assertIsNotNone(self.hostcollection.wait_until_element(
                common_locators['alert.error_sub_form']))
예제 #39
0
    def test_negative_content_hosts_limit(self):
        """Check that Content Host limit actually limits usage

        @Feature: Host Collection - Content Host Limit

        @Steps:
        1. Create Host Collection entity that can contain only one Content Host
        (using Content Host Limit field)
        2. Create Content Host and add it to Host Collection. Check that it
        added successfully
        3. Create one more Content Host and try to add it to Host Collection
        4. Check that expected error is shown

        @Assert: Second content host is not added to Host Collection and
        appropriate error is shown
        """
        name = gen_string('alpha')
        cv = entities.ContentView(organization=self.organization).create()
        lce = entities.LifecycleEnvironment(
            organization=self.organization).create()
        cv.publish()
        promote(cv.read().version[0], lce.id)
        new_systems = [
            make_content_host({
                u'content-view-id': cv.id,
                u'lifecycle-environment-id': lce.id,
                u'name': gen_string('alpha'),
                u'organization-id': self.organization.id,
            })['name'] for _ in range(2)
        ]
        with Session(self.browser) as session:
            make_host_collection(session,
                                 org=self.organization.name,
                                 name=name,
                                 limit='1')
            self.hostcollection.add_content_host(name, new_systems[0])
            with self.assertRaises(UIError):
                self.hostcollection.add_content_host(name, new_systems[1])
            self.assertIsNotNone(
                self.hostcollection.wait_until_element(
                    common_locators['alert.error_sub_form']))
예제 #40
0
    def test_negative_create_with_invalid_limit(self):
        """Create Host Collections with invalid Content Host Limit value. Both
        with too long numbers and using letters.

        @id: c15b3540-809e-4339-ad5f-1ab488244299

        @Assert: Host Collection is not created. Appropriate error shown.
        """
        with Session(self.browser) as session:
            for limit in invalid_names_list():
                with self.subTest(limit):
                    make_host_collection(
                        session,
                        name=gen_string('alpha'),
                        org=self.organization.name,
                        limit=limit,
                    )
                    self.assertIsNotNone(
                        self.hostcollection.wait_until_element(
                            common_locators['invalid_limit'])
                    )
예제 #41
0
    def test_positive_add_content_host(self):
        """Check if content host can be added to Host Collection

        @Feature: Host Collection - Content Host

        @Assert: Content host is added to Host Collection successfully
        """
        name = gen_string('alpha')
        cv = entities.ContentView(organization=self.organization).create()
        lce = entities.LifecycleEnvironment(
            organization=self.organization).create()
        cv.publish()
        promote(cv.read().version[0], lce.id)
        new_system = make_content_host({
            u'content-view-id': cv.id,
            u'lifecycle-environment-id': lce.id,
            u'name': gen_string('alpha'),
            u'organization-id': self.organization.id,
        })
        with Session(self.browser) as session:
            make_host_collection(
                session, org=self.organization.name, name=name)
            self.hostcollection.add_content_host(name, new_system['name'])