def setUp(self): # insert server type! with mock.patch('abell.mongo'): app = create_app(test_config) self.app = app.test_client() self.app_context = app.app_context() self.app_context.push()
def setUp(self): # insert server type! app = create_app(test_config) self.app = app.test_client() self.app_context = app.app_context() self.app_context.push() AbellDb().nuke_all_collections()
def _make_context(): return dict(app=create_app(config.dev_config))
from abell import create_app, config from flask_script import Server, Shell, Manager def _make_context(): return dict(app=create_app(config.dev_config)) app = create_app(config=config.dev_config) manager = Manager(app) manager.add_command('runserver', Server(host="0.0.0.0", port=6000)) manager.add_command('shell', Shell(make_context=_make_context)) if __name__ == '__main__': manager.run()
def setUp(self): with mock.patch('abell.mongo'): app = create_app(test_config) self.app = app.test_client()
def setUp(self): app = create_app(test_config) self.app = app.test_client()