from inventoryserver.server import SpecialOrders # cherrypy.config.update({'environment': 'embedded'}) if cherrypy.__version__.startswith("3.0") and cherrypy.engine.state == 0: cherrypy.engine.start(blocking=False) atexit.register(cherrypy.engine.stop) class Root(object): def index(self): return "Hello World!" index.exposed = True root = InventoryServer() root.admin = Admin() root.staffing = Staffing() root.notes = Noteboard() root.register = Register() root.specialorder = SpecialOrders() cherrypy_local_config_file = configuration.get("cherrypy_local_config_file") application = cherrypy.Application( root, script_name=None, config=cherrypy_local_config_file ) if __name__ == "__main__": cherrypy.quickstart(root, "/", cherrypy_local_config_file)
def setUp(self): try: self._my_class = Noteboard() except Exception as excp: pass