# Path: ptp/libptp/constants.py
# UNKNOWN = 0
# INFO = 1
# LOW = 2
# MEDIUM = 3
# HIGH = 4
# RANKING_SCALE = {HIGH: HIGH, MEDIUM: MEDIUM, LOW: LOW, INFO: INFO, UNKNOWN: UNKNOWN}
# 
# Path: ptp/libptp/exceptions.py
# class NotSupportedVersionError(PTPError):
#     """:mod:`ptp` error when the version of the tool is not supported."""
#     pass


from ptp.libptp import constants
from ptp.libptp.exceptions import NotSupportedVersionError
class MockParserHigh(MockParser):

    __tool__ = 'mock_high'

    def parse_report(self):
        return [{'ranking': constants.HIGH}]


class MockParserLight(MockParser):

    ___tool__ = 'mock_light'

    def __init__(self, light=True):
        self.light = light
        MockParser.__init__(self)

    @classmethod
    def handle_file(cls, light=True):
        return ''

    @classmethod
    def is_mine(cls, light=True):
        return True

    def parse_metadata(self):
        return {}

    def parse_report(self):
        vulns = []
        if not self.light:  # More complete parsing

# Path: ptp/libptp/constants.py
# UNKNOWN = 0
# INFO = 1
# LOW = 2
# MEDIUM = 3
# HIGH = 4
# RANKING_SCALE = {HIGH: HIGH, MEDIUM: MEDIUM, LOW: LOW, INFO: INFO, UNKNOWN: UNKNOWN}
# 
# Path: ptp/libptp/exceptions.py
# class NotSupportedVersionError(PTPError):
#     """:mod:`ptp` error when the version of the tool is not supported."""
#     pass


# Path: tests/utils.py
from ptp.libptp import constants
from ptp.libptp.exceptions import NotSupportedVersionError

class MockParserHigh(MockParser):

    __tool__ = 'mock_high'

    def parse_report(self):
        return [{'ranking': constants.HIGH}]


class MockParserLight(MockParser):

    ___tool__ = 'mock_light'

    def __init__(self, light=True):
        self.light = light
        MockParser.__init__(self)

    @classmethod
    def handle_file(cls, light=True):
        return ''

    @classmethod
    def is_mine(cls, light=True):
        return True

    def parse_metadata(self):
        return {}

    def parse_report(self):
        vulns = []
        if not self.light:  # More complete parsing

            vulns = [{'ranking': constants.UNKNOWN, 'transactions': [{'request': '', 'response': ''}]}]