# 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):


import validator.constants
from validator import decorator
from validator.constants import FF4_MIN, APPLICATIONS

            all_supported_versions[guid] = (
                app_versions[min_ver_pos:max_ver_pos + 1])

            err.metadata['applications'][APPLICATIONS[guid]] = {
                'min': min_version,
                'max': max_version,
            }

            # Test whether it's a FF4 addon

            # NOTE: This should probably also be extrapolated for
            # Thunderbird and the like when they get up to speed. The tests
            # will likely be the same down the line, so we can keep the
            # "ff4" resource as a legacy thing and worry about it later.
            if is_firefox:
                ff4_pos = app_versions.index(FF4_MIN)
                if max_ver_pos >= ff4_pos:
                    err.save_resource('ff4', True)

    no_duplicate_targets = set(used_targets)

    if len(used_targets) != len(no_duplicate_targets):
        err.error(('testcases_targetapplication',
                   'test_targetedapplications',
                   'duplicate_targetapps'),
                  'Found duplicate target application elements.',
                  'Multiple target application elements were found in the '
                  'manifest file that refer to the same application GUID. '
                  'There should not be duplicate target applications '

# 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/testcases/targetapplication.py
import validator.constants
from validator import decorator
from validator.constants import FF4_MIN, APPLICATIONS


            all_supported_versions[guid] = (
                app_versions[min_ver_pos:max_ver_pos + 1])

            err.metadata['applications'][APPLICATIONS[guid]] = {
                'min': min_version,
                'max': max_version,
            }

            # Test whether it's a FF4 addon

            # NOTE: This should probably also be extrapolated for
            # Thunderbird and the like when they get up to speed. The tests
            # will likely be the same down the line, so we can keep the
            # "ff4" resource as a legacy thing and worry about it later.
            if is_firefox:
                ff4_pos = app_versions.index(FF4_MIN)
                if max_ver_pos >= ff4_pos:
                    err.save_resource('ff4', True)

    no_duplicate_targets = set(used_targets)

    if len(used_targets) != len(no_duplicate_targets):
        err.error(('testcases_targetapplication',
                   'test_targetedapplications',
                   'duplicate_targetapps'),
                  'Found duplicate target application elements.',
                  'Multiple target application elements were found in the '
                  'manifest file that refer to the same application GUID. '
                  'There should not be duplicate target applications '

                  'entries.',