示例#1
0
 def setUp(self):
     super(FunctionalTestServer, self).setUp()
     if self.config and self.cfg_file and self.flask_app:
         mod = plugin.load_module(self.flask_app)
         make_config(self.config, self.cfg_file)
         self.test_server = TestServer(port=None, index=None, python_app_module_path=os.path.abspath(mod.__file__), cfg_file=self.cfg_file)
         self.test_server.spawn_with_config()
示例#2
0
def initialise():
    from octopus.lib import plugin
    mods = app.config.get("INITIALISE_MODULES", [])
    for modpath in mods:
        mod = plugin.load_module(modpath)
        fn = getattr(mod, "initialise")
        fn()
    print "App initialised at ", datetime.now().strftime("%H:%M:%S %d-%m-%Y")
示例#3
0
def initialise():
    from octopus.lib import plugin
    mods = app.config.get("INITIALISE_MODULES", [])
    for modpath in mods:
        mod = plugin.load_module(modpath)
        fn = getattr(mod, "initialise")
        fn()
    print "App initialised at ", datetime.now().strftime("%H:%M:%S %d-%m-%Y")
示例#4
0
 def setUp(self):
     super(FunctionalTestServer, self).setUp()
     if self.config and self.cfg_file and self.flask_app:
         mod = plugin.load_module(self.flask_app)
         make_config(self.config, self.cfg_file)
         self.test_server = TestServer(
             port=None,
             index=None,
             python_app_module_path=os.path.abspath(mod.__file__),
             cfg_file=self.cfg_file)
         self.test_server.spawn_with_config()