Esempio n. 1
0
 def testInvalidCountProcess(self):
     """have plugin whose count process doesn't come up"""
     self.copyPlugin()
     # F**k with the plugin executable script
     with open(os.path.join(self.plugin_dest, "test-plugin"), "w") as f:
         f.write("This is so not executable")
     plugin.scan_for_plugins()
     gevent.sleep(.3)
     self.failIf(len(plugin.plugins_available()) > 0)
Esempio n. 2
0
def _handle_plugin_list(identity, msg):
    """Handle a request for the list of plugins available to the router.

    """
    queue.add(identity, ["s", "BPPluginList",
                         [{"name": p.name,
                           "version": p.version}
                          for p in plugin.plugins_available()]])
    return True
Esempio n. 3
0
 def testOnePluginIncorrectJSON(self):
     """have plugin with invalid json"""
     # Copy plugin to directory here
     self.copyPlugin()
     # Edit json
     with open(os.path.join(self.plugin_dest, plugin.Plugin.PLUGIN_INFO_FILE), "w") as f:
         f.write("This is so not some f*****g json")
     plugin.scan_for_plugins()
     gevent.sleep(.3)
     self.failIf(len(plugin.plugins_available()) > 0)
Esempio n. 4
0
def _handle_plugin_list(identity, msg):
    """Handle a request for the list of plugins available to the router.

    """
    queue.add(
        identity, ["s", "BPPluginList", [{"name": p.name, "version": p.version} for p in plugin.plugins_available()]]
    )
    return True
Esempio n. 5
0
 def testOnePluginCorrectJSON(self):
     """have valid plugin, with a valid count process"""
     self.copyPlugin()
     plugin.scan_for_plugins()
     gevent.sleep(.3)
     self.failIf(len(plugin.plugins_available()) != 1)