Ejemplo n.º 1
0
 def testPlugin(self):
     w = Worker()
     w.register_plugin(PluginTrafficAccountingInfoMox)
     w.register_plugin(PluginAgentInfo)
     assert len(w.plugins) == 2
     w.clear_plugin()
     assert len(w.plugins) == 0
     print "Plugin test \t[\033[1;33mOK\033[0m]"
Ejemplo n.º 2
0
 def testInfoPush(self):
     self.mox.ReplayAll()
     w = Worker(context = ZmqContextMox())
     w.register_plugin(PluginTrafficAccountingInfoMox)
     w.register_plugin(PluginAgentInfo)
     w.info_push()
     self.mox.VerifyAll()
     print "info_push test \t[\033[1;33mOK\033[0m]"