def webserver(app, cors, wdb, public, verbose_request_logging): """Start a development webserver server """ if cors: from flask.ext.cors import CORS CORS(app) kw = dict(debug=True) if public: kw['host'] = '0.0.0.0' if wdb: from wdb.ext import WdbMiddleware app.wsgi_app = WdbMiddleware(app.wsgi_app) kw['use_debugger'] = False # Disable builtin Werkzeug debugger if verbose_request_logging: app.logger.setLevel(logging.DEBUG) app.config['LOG_REQUESTS'] = True populate_listing_cache() app.run(reloader_type='watchdog', **kw)
def setUp(self): populate_listing_cache()