# Path: validator/decorator.py
# TEST_TIERS = {}
# CLEANUP_FUNCTIONS = []
# def register_test(tier=1, expected_type=None, simple=False, versions=None):
#     def wrap(function):
# def register_cleanup(cleanup):
# def cleanup():
# def get_tiers():
# def get_tests(tier, type_=None):
# def version_range(guid, version, before=None, app_versions=None):
# 
# Path: validator/metadata_helpers.py
# VERSION_PATTERN = re.compile('^[-+*.\w]{,32}$')
# def validate_name(err, value, source):
# def validate_id(err, value, source):
# def validate_version(err, value, source):


from validator import decorator
from validator.constants import PACKAGE_THEME
from validator import metadata_helpers


OPTIONS_TYPE_VALUES = ('1', '2', '3')


@decorator.register_test(tier=1)
def test_install_rdf_params(err, xpi_package=None):
    """Tests to make sure that some of the values in install.rdf
    are not gummed up."""

    if not err.get_resource('has_install_rdf'):
        return

    install = err.get_resource('install_rdf')

    # This returns for testing reasons
    return _test_rdf(err, install)


def _test_rdf(err, install):
    """Wrapper for install.rdf testing to make unit testing so much
    easier."""

    is_compat = err.get_resource('is_compat_test')

    shouldnt_exist = {'hidden'}

# Path: validator/decorator.py
# TEST_TIERS = {}
# CLEANUP_FUNCTIONS = []
# def register_test(tier=1, expected_type=None, simple=False, versions=None):
#     def wrap(function):
# def register_cleanup(cleanup):
# def cleanup():
# def get_tiers():
# def get_tests(tier, type_=None):
# def version_range(guid, version, before=None, app_versions=None):
# 
# Path: validator/metadata_helpers.py
# VERSION_PATTERN = re.compile('^[-+*.\w]{,32}$')
# def validate_name(err, value, source):
# def validate_id(err, value, source):
# def validate_version(err, value, source):


# Path: validator/testcases/installrdf.py
from validator import decorator
from validator.constants import PACKAGE_THEME
from validator import metadata_helpers



OPTIONS_TYPE_VALUES = ('1', '2', '3')


@decorator.register_test(tier=1)
def test_install_rdf_params(err, xpi_package=None):
    """Tests to make sure that some of the values in install.rdf
    are not gummed up."""

    if not err.get_resource('has_install_rdf'):
        return

    install = err.get_resource('install_rdf')

    # This returns for testing reasons
    return _test_rdf(err, install)


def _test_rdf(err, install):
    """Wrapper for install.rdf testing to make unit testing so much
    easier."""

    is_compat = err.get_resource('is_compat_test')

    shouldnt_exist = {'hidden'}

    if err.get_resource('listed'):