__author__ = 'bjorn'

# fake shinken objects for testing, we only implement what we need for simplicity

class ShinkenObject(object):
    @classmethod
    @property
    def my_type(cls):
        return cls.__name__.lower()

    def __init__(self, check):
        self.customs = {}
        self.check_command = check

    def add_custom(self, key, value):
        self.customs[key] = value


class CheckCommand(object):
    def __init__(self, name):
        self._name = name

    def get_name(self):
        return self._name


class Host(ShinkenObject):
    def __init__(self, hostname, check):
        ShinkenObject.__init__(self, check)
        self.hostname = hostname
        self.services = []


class Service(ShinkenObject):
    def __init__(self, name, host, check):
        ShinkenObject.__init__(self, check)
        self.host = host
        host.services.append(self)
        self.service_description = name


class ShinkenModuleConfig(object):
    def __init__(self):
        pass

    def set_value(self, key, value):
        setattr(self, key, value)

    def del_value(self, key):
        delattr(self, key)

    def get_value(self, key):
        return getattr(self, key)

    def duplicate(self):
        new = self.__class__()
        new.__dict__ = dict(self.__dict__)
        return new

@@ -98,16 +98,17 @@
 licity%0A%0A
+%0A
 class Sh
@@ -136,21 +136,39 @@
     
-@
 class
-method%0A
+ __metaclass__(type):%0A    
     
@@ -177,16 +177,20 @@
 roperty%0A
+    
     def 
@@ -203,16 +203,20 @@
 e(cls):%0A
+    
         
@@ -335,16 +335,42 @@
  = check
+%0A        self.perf_data=''
 %0A%0A    de
@@ -699,24 +699,25 @@
    self.host
+_
 name = hostn

tweak the fake shinken objects