def setUpClass(cls): config = slimline.get_config() config.set_web_port(cls.PORT) slimline.configure(config) slimline.run() slimline.add_callback(MultiplyCallback("multiply"))
def setUp(self): c = MpdServerTest.config[SECTION_SERVER] slimline_config = slimline.get_config() slimline_config.set_web_bind_address(c[SLIMLINE_BIND_ADDRESS].get(str)) slimline_config.set_web_port(c[SLIMLINE_PORT].get(int)) slimline_config.set_idle_thread_count(c[SLIMLINE_THREADS].get(int)) slimline_config.set_max_extra_threads(c[SLIMLINE_MAX_THREADS].get(int)) slimline.configure(slimline_config) slimline.run()
def _launch(self): """Bring the server up""" self._launch_essential() self._launch_extras() slimline.run() # Actually start listening for stuff! broadcast.add_listener(broadcast.BROADCAST_SHUTDOWN, slimline.stop)