def _setupSyslog(testCase):
 logMessages = []
 class fakesyslogobserver(object, ):
  def __init__(self, prefix):
   logMessages.append(prefix)
  def emit(self, eventDict):
   logMessages.append(eventDict)
 testCase.patch(syslog, 'SyslogObserver', fakesyslogobserver)
 return logMessages

def _setupSyslog ( testCase ) : logMessages = [ ] class fakesyslogobserver ( object , ) : def __init__ ( self , prefix ) : logMessages . append ( prefix ) def emit ( self , eventDict ) : logMessages . append ( eventDict ) testCase . patch ( syslog , 'SyslogObserver' , fakesyslogobserver ) return logMessages
make fake syslog .