# 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
import time
import os
from kitty.model import Template, GraphModel, String, UInt32
from kitty.fuzzers import ServerFuzzer
from kitty.interfaces.base import EmptyInterface
from mocks.mock_target import ServerTargetMock
        model.logger = self.logger
        model.connect(template1)
        model.connect(template1, template2, t1_t2_cb)
        model.connect(template1, template3, t1_t3_cb)
        self.model = model
        self.fuzzer.set_model(model)
        self.fuzzer.set_range()
        self.fuzzer.start()
        self.assertEqual(template2.num_mutations(), self.cb2_call_count)
        self.assertEqual(template3.num_mutations(), self.cb3_call_count)

    def testCorrectCallbackIsCalledForAllEdgesInPath(self):
        template1 = Template(name='template1', fields=String('str1'))
        template2 = Template(name='template2', fields=String('str2'))
        template3 = Template(name='template3', fields=String('str3'))
        self.cb2_call_count = 0
        self.cb3_call_count = 0

        def t1_t2_cb(fuzzer, edge, response):
            self.assertEqual(fuzzer, self.fuzzer)
            self.assertEqual(edge.src, template1)
            self.assertEqual(edge.dst, template2)
            self.cb2_call_count += 1

        def t2_t3_cb(fuzzer, edge, response):
            self.assertEqual(fuzzer, self.fuzzer)
            self.assertEqual(edge.src, template2)
            self.assertEqual(edge.dst, template3)
            self.cb3_call_count += 1


# 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_server.py
import unittest
import logging
import time
import os
from kitty.model import Template, GraphModel, String, UInt32
from kitty.fuzzers import ServerFuzzer
from kitty.interfaces.base import EmptyInterface
from mocks.mock_target import ServerTargetMock

        model.logger = self.logger
        model.connect(template1)
        model.connect(template1, template2, t1_t2_cb)
        model.connect(template1, template3, t1_t3_cb)
        self.model = model
        self.fuzzer.set_model(model)
        self.fuzzer.set_range()
        self.fuzzer.start()
        self.assertEqual(template2.num_mutations(), self.cb2_call_count)
        self.assertEqual(template3.num_mutations(), self.cb3_call_count)

    def testCorrectCallbackIsCalledForAllEdgesInPath(self):
        template1 = Template(name='template1', fields=String('str1'))
        template2 = Template(name='template2', fields=String('str2'))
        template3 = Template(name='template3', fields=String('str3'))
        self.cb2_call_count = 0
        self.cb3_call_count = 0

        def t1_t2_cb(fuzzer, edge, response):
            self.assertEqual(fuzzer, self.fuzzer)
            self.assertEqual(edge.src, template1)
            self.assertEqual(edge.dst, template2)
            self.cb2_call_count += 1

        def t2_t3_cb(fuzzer, edge, response):
            self.assertEqual(fuzzer, self.fuzzer)
            self.assertEqual(edge.src, template2)
            self.assertEqual(edge.dst, template3)
            self.cb3_call_count += 1


        model = GraphModel()