# 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
                               'install.rdf',
                               signing_severity='trivial')
            else:
                err.notice(('testcases_installrdf',
                            '_test_rdf',
                            'missing_updateURL'),
                           'Missing updateURL element',
                           'Your add-on does not specify an update URL. This '
                           'means that it will be impossible for you to serve '
                           'updates to this add-on which are not listed publicly '
                           'on addons.mozilla.org.',
                           'install.rdf',
                           signing_severity='trivial')

        # Once all of the predicates have been tested, make sure there are
        # no mandatory elements that haven't been found.
        if must_exist_once:
            err.error(('testcases_installrdf',
                       '_test_rdf',
                       'missing_addon'),
                      'install.rdf missing element(s).',
                      ['The element listed is a required element in the install '
                       'manifest specification. It must be added to your addon.',
                       'Missing elements: %s' % ', '.join(must_exist_once)],
                      'install.rdf')


PREDICATE_TESTS = {
    'id': metadata_helpers.validate_id,
    'version': metadata_helpers.validate_version,

# 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

                               'install.rdf',
                               signing_severity='trivial')
            else:
                err.notice(('testcases_installrdf',
                            '_test_rdf',
                            'missing_updateURL'),
                           'Missing updateURL element',
                           'Your add-on does not specify an update URL. This '
                           'means that it will be impossible for you to serve '
                           'updates to this add-on which are not listed publicly '
                           'on addons.mozilla.org.',
                           'install.rdf',
                           signing_severity='trivial')

        # Once all of the predicates have been tested, make sure there are
        # no mandatory elements that haven't been found.
        if must_exist_once:
            err.error(('testcases_installrdf',
                       '_test_rdf',
                       'missing_addon'),
                      'install.rdf missing element(s).',
                      ['The element listed is a required element in the install '
                       'manifest specification. It must be added to your addon.',
                       'Missing elements: %s' % ', '.join(must_exist_once)],
                      'install.rdf')


PREDICATE_TESTS = {
    'id': metadata_helpers.validate_id,
    'version': metadata_helpers.validate_version,

    'name': metadata_helpers.validate_name,