@classmethod
def _test_scheme(cls, scheme):
    """
            Test if a scheme is valide or raise BadScheme

            :param bytes scheme: A scheme
            :raises BadScheme: if ``scheme`` is not a valid scheme
        """
    if scheme not in cls.schemes_salt and scheme not in cls.schemes_nosalt:
        cls._raise_bad_scheme(scheme, cls.schemes_salt | cls.schemes_nosalt,
            'The scheme %r is not valid. Valide schemes are %s.')
