예제 #1
0
    def test_negative_create_with_auth_url_too_long(self):
        """Verify that repository URL length is limited

        @id: 5aad4e9f-f7e1-497c-8e1f-55e07e38ee80

        @Assert: A repository is not created and error is raised.
        """
        for cred in invalid_http_credentials():
            with self.subTest(cred):
                url = FAKE_5_YUM_REPO.format(cred['login'], cred['pass'])
                with self.assertRaises(HTTPError):
                    entities.Repository(url=url).create()
예제 #2
0
    def test_negative_create_with_auth_url_too_long(self):
        """Verify that repository URL length is limited

        @Assert: A repository is not created and error is raised.

        @Feature: HTTP Authentication Repository
        """
        for cred in invalid_http_credentials():
            with self.subTest(cred):
                url = FAKE_5_YUM_REPO.format(cred['login'], cred['pass'])
                with self.assertRaises(HTTPError):
                    entities.Repository(url=url).create()
예제 #3
0
    def test_negative_create_with_auth_url_too_long(self):
        """Verify that repository URL length is limited

        @id: 5aad4e9f-f7e1-497c-8e1f-55e07e38ee80

        @Assert: A repository is not created and error is raised.
        """
        for cred in invalid_http_credentials():
            with self.subTest(cred):
                url = FAKE_5_YUM_REPO.format(cred['login'], cred['pass'])
                with self.assertRaises(HTTPError):
                    entities.Repository(url=url).create()
예제 #4
0
    def test_negative_create_with_auth_url_too_long(self):
        """Verify that repository URL length is limited

        @id: de356c66-4237-4421-89e3-f4f8bbe6f526

        @Assert: Repository cannot be created
        """
        for cred in invalid_http_credentials():
            with self.subTest(cred):
                url = FAKE_5_YUM_REPO.format(cred['login'], cred['pass'])
                with self.assertRaises(CLIFactoryError):
                    self._make_repository({u'url': url})
예제 #5
0
    def test_negative_create_with_auth_url_too_long(self):
        """Verify that repository URL length is limited

        @Assert: A repository is not created and error is raised.

        @Feature: HTTP Authentication Repository
        """
        for cred in invalid_http_credentials():
            with self.subTest(cred):
                url = FAKE_5_YUM_REPO.format(cred['login'], cred['pass'])
                with self.assertRaises(HTTPError):
                    entities.Repository(url=url).create()
예제 #6
0
    def test_negative_create_with_auth_url_too_long(self):
        """Verify that repository URL length is limited

        @id: de356c66-4237-4421-89e3-f4f8bbe6f526

        @Assert: Repository cannot be created
        """
        for cred in invalid_http_credentials():
            with self.subTest(cred):
                url = FAKE_5_YUM_REPO.format(cred['login'], cred['pass'])
                with self.assertRaises(CLIFactoryError):
                    self._make_repository({u'url': url})
예제 #7
0
    def test_negative_create_with_auth_url_with_special_characters(self):
        """Verify that repository URL cannot contain unquoted special characters

        @id: 2bd5ee17-0fe5-43cb-9cdc-dc2178c5374c

        @Assert: Repository cannot be created
        """
        # get a list of valid credentials without quoting them
        for cred in [creds for creds in valid_http_credentials() if creds["quote"] is True]:
            with self.subTest(cred):
                url = FAKE_5_YUM_REPO.format(cred["login"], cred["pass"])
                with self.assertRaises(CLIFactoryError):
                    self._make_repository({u"url": url})
예제 #8
0
    def test_negative_create_with_auth_url_with_special_characters(self):
        """Verify that repository URL cannot contain unquoted special characters

        @Assert: A repository is not created and error is raised.

        @Feature: HTTP Authentication Repository
        """
        # get a list of valid credentials without quoting them
        for cred in [creds for creds in valid_http_credentials() if creds["quote"] is True]:
            with self.subTest(cred):
                url = FAKE_5_YUM_REPO.format(cred["login"], cred["pass"])
                with self.assertRaises(HTTPError):
                    entities.Repository(url=url).create()
예제 #9
0
    def test_negative_create_with_auth_url_with_special_characters(self):
        """Verify that repository URL cannot contain unquoted special characters

        @id: 2ffaa412-e5e5-4bec-afaa-9ea54315df49

        @Assert: A repository is not created and error is raised.
        """
        # get a list of valid credentials without quoting them
        for cred in [creds for creds in valid_http_credentials()
                     if creds['quote'] is True]:
            with self.subTest(cred):
                url = FAKE_5_YUM_REPO.format(cred['login'], cred['pass'])
                with self.assertRaises(HTTPError):
                    entities.Repository(url=url).create()
예제 #10
0
    def test_negative_create_with_auth_url_with_special_characters(self):
        """Verify that repository URL cannot contain unquoted special characters

        @Feature: Repository

        @Assert: Repository cannot be created
        """
        # get a list of valid credentials without quoting them
        for cred in [creds for creds in valid_http_credentials()
                     if creds['quote'] is True]:
            with self.subTest(cred):
                url = FAKE_5_YUM_REPO.format(cred['login'], cred['pass'])
                with self.assertRaises(CLIFactoryError):
                    self._make_repository({u'url': url})
예제 #11
0
    def test_negative_create_with_auth_url_with_special_characters(self):
        """Verify that repository URL cannot contain unquoted special characters

        @id: 2ffaa412-e5e5-4bec-afaa-9ea54315df49

        @Assert: A repository is not created and error is raised.
        """
        # get a list of valid credentials without quoting them
        for cred in [creds for creds in valid_http_credentials()
                     if creds['quote'] is True]:
            with self.subTest(cred):
                url = FAKE_5_YUM_REPO.format(cred['login'], cred['pass'])
                with self.assertRaises(HTTPError):
                    entities.Repository(url=url).create()
예제 #12
0
    def test_negative_create_with_auth_url_with_special_characters(self):
        """Verify that repository URL cannot contain unquoted special characters

        @id: 2bd5ee17-0fe5-43cb-9cdc-dc2178c5374c

        @Assert: Repository cannot be created
        """
        # get a list of valid credentials without quoting them
        for cred in [
                creds for creds in valid_http_credentials()
                if creds['quote'] is True
        ]:
            with self.subTest(cred):
                url = FAKE_5_YUM_REPO.format(cred['login'], cred['pass'])
                with self.assertRaises(CLIFactoryError):
                    self._make_repository({u'url': url})