# Path: kitty/interfaces/base.py
# class EmptyInterface(BaseInterface):
#     '''
#     This interface may be used when there is no need for user interface
#     '''
# 
#     def __init__(self, name='EmptyInterface', logger=None):
#         '''
#         :param name: name of the object
#         :param logger: logger for the object (default: None)
#         '''
#         super(EmptyInterface, self).__init__(name, logger)
# 
#     def failure_detected(self):
#         '''
#         handle failure detection
#         '''
#         pass
# 
#     def progress(self):
#         '''
#         handle progress
#         '''
#         pass
# 
#     def finished(self):
#         '''
#         handle finished
#         '''
#         pass
# 
#     def _start(self):
#         pass
# 
#     def _stop(self):
#         pass


import unittest
import logging
from kitty.model import Template, GraphModel, String, UInt32
from kitty.fuzzers import ClientFuzzer
from kitty.interfaces.base import EmptyInterface
from mocks.mock_target import ClientTargetMock

class TestClientFuzzer(unittest.TestCase):

    def setUp(self):
        self.logger = get_test_logger()
        self.logger.debug('TESTING METHOD: %s', self._testMethodName)
        self._default_stage = 'simple_str_template'

        self.t_str = Template(name=self._default_stage, fields=[String(name='str1', value='kitty')])

        self.t_int = Template(name='simple_int_template', fields=[UInt32(name='int1', value=0x1234)])
        self.fuzzer = None
        self.mutations = {}
        self.prepare()

    def tearDown(self):
        if self.fuzzer:
            self.fuzzer.stop()

    def default_callback(self, test, stage, resp):
        if test not in self.mutations:
            self.mutations[test] = []
        self.mutations[test].append((stage, resp))

    def prepare(self):
        self.start_index = 10
        self.end_index = 20
        self.delay_duration = 0
        self.fuzzer = ClientFuzzer(name="TestServerFuzzer", logger=self.logger)


# Path: kitty/interfaces/base.py
# class EmptyInterface(BaseInterface):
#     '''
#     This interface may be used when there is no need for user interface
#     '''
# 
#     def __init__(self, name='EmptyInterface', logger=None):
#         '''
#         :param name: name of the object
#         :param logger: logger for the object (default: None)
#         '''
#         super(EmptyInterface, self).__init__(name, logger)
# 
#     def failure_detected(self):
#         '''
#         handle failure detection
#         '''
#         pass
# 
#     def progress(self):
#         '''
#         handle progress
#         '''
#         pass
# 
#     def finished(self):
#         '''
#         handle finished
#         '''
#         pass
# 
#     def _start(self):
#         pass
# 
#     def _stop(self):
#         pass


# Path: tests/test_fuzzer_client.py
import unittest
import logging
from kitty.model import Template, GraphModel, String, UInt32
from kitty.fuzzers import ClientFuzzer
from kitty.interfaces.base import EmptyInterface
from mocks.mock_target import ClientTargetMock


class TestClientFuzzer(unittest.TestCase):

    def setUp(self):
        self.logger = get_test_logger()
        self.logger.debug('TESTING METHOD: %s', self._testMethodName)
        self._default_stage = 'simple_str_template'

        self.t_str = Template(name=self._default_stage, fields=[String(name='str1', value='kitty')])

        self.t_int = Template(name='simple_int_template', fields=[UInt32(name='int1', value=0x1234)])
        self.fuzzer = None
        self.mutations = {}
        self.prepare()

    def tearDown(self):
        if self.fuzzer:
            self.fuzzer.stop()

    def default_callback(self, test, stage, resp):
        if test not in self.mutations:
            self.mutations[test] = []
        self.mutations[test].append((stage, resp))

    def prepare(self):
        self.start_index = 10
        self.end_index = 20
        self.delay_duration = 0
        self.fuzzer = ClientFuzzer(name="TestServerFuzzer", logger=self.logger)


        self.interface = EmptyInterface()