コード例 #1
0
 def test_create_positive_2(self, name):
     """
     @Test: Create new puppet-class with 255 chars
     @Feature: Puppet-Classes - Positive Create
     @Assert: Puppet-Classes is created with 255 chars
     """
     with Session(self.browser) as session:
         make_puppetclasses(session, name=name)
         search = self.puppetclasses.search(name)
         self.assertIsNotNone(search)
コード例 #2
0
 def test_create_negative_1(self, name):
     """
     @Test: Create new puppet-class with 256 chars
     @Feature: Puppet-Classes - Negative Create
     @Assert: Puppet-Classes is not created with 256 chars
     @BZ: 1126496
     """
     with Session(self.browser) as session:
         make_puppetclasses(session, name=name)
         search = self.puppetclasses.search(name)
         self.assertIsNone(search)
コード例 #3
0
 def test_create_negative_3(self):
     """
     @Test: Create new puppet-class with blank name
     @Feature: Puppet-Classes - Negative Create
     @Assert: Puppet-Classes is not created with 256 chars
     """
     name = "    "
     with Session(self.browser) as session:
         make_puppetclasses(session, name=name)
         error = session.nav.wait_until_element(
             common_locators["name_haserror"])
         self.assertIsNotNone(error)
コード例 #4
0
 def test_update_positive_1(self, testdata):
     """
     @Test: Create new puppet-class
     @Feature: Puppet-Classes - Positive Update
     @Assert: Puppet-Classes is updated.
     """
     name = testdata['name']
     new_name = testdata['new_name']
     with Session(self.browser) as session:
         make_puppetclasses(session, name=name)
         search = self.puppetclasses.search(name)
         self.assertIsNotNone(search)
         self.puppetclasses.update(name, new_name)
コード例 #5
0
    def test_update_positive_1(self, testdata):
        """@Test: Create new puppet-class

        @Feature: Puppet-Classes - Positive Update

        @Assert: Puppet-Classes is updated.

        """
        name = testdata['name']
        new_name = testdata['new_name']
        with Session(self.browser) as session:
            make_puppetclasses(session, name=name)
            search = self.puppetclasses.search(name)
            self.assertIsNotNone(search)
            self.puppetclasses.update(name, new_name)
コード例 #6
0
 def test_delete_positive_1(self, name):
     """
     @Test: Create new puppet-class
     @Feature: Puppet-Classes - Positive delete
     @Assert: Puppet-Class is deleted
     @BZ: 1126473
     """
     with Session(self.browser) as session:
         make_puppetclasses(session, name=name)
         search = self.puppetclasses.search(name)
         self.assertIsNotNone(search)
         self.puppetclasses.delete(name, True)
         self.assertIsNotNone(session.nav.wait_until_element
                              (common_locators["notif.success"]))
         self.assertIsNone(self.puppetclasses.search(name))
コード例 #7
0
    def test_delete_positive_1(self, name):
        """@Test: Create new puppet-class

        @Feature: Puppet-Classes - Positive delete

        @Assert: Puppet-Class is deleted

        @BZ: 1126473

        """
        with Session(self.browser) as session:
            make_puppetclasses(session, name=name)
            search = self.puppetclasses.search(name)
            self.assertIsNotNone(search)
            self.puppetclasses.delete(name, True)
            self.assertIsNotNone(
                session.nav.wait_until_element(
                    common_locators["notif.success"]))
            self.assertIsNone(self.puppetclasses.search(name))