def setUp(self): self.app = Flask(__name__) self.app.config['TESTING'] = True self.plugin_manager = PluginManager() self.plugin_manager.init_app(self.app) # Call load_plugins to reload them without calling setup_plugins() self.plugin_manager.load_plugins()
# CSRF protection from flask_wtf.csrf import CsrfProtect csrf = CsrfProtect() # Timeouts timeouts = dict() # Ratelimits ratelimits = dict() # Newsletter from newsletter import Newsletter newsletter = Newsletter() # Importer from importers import Importer importer = Importer() # Flickr OAuth integration for importer from pybossa.flickr_client import FlickrClient flickr = FlickrClient() from flask.ext.plugins import PluginManager plugin_manager = PluginManager()
def setUp(self): self.app = Flask(__name__) self.app.config['TESTING'] = True self.plugin_manager = PluginManager(self.app) self.event_manager = self.plugin_manager._event_manager
def setUp(self): self.app = Flask(__name__) self.app.config['TESTING'] = True self.plugin_manager = PluginManager() self.plugin_manager.init_app(self.app) self.plugin_manager.load_plugins()
def test_class_init(self): plugin_manager = PluginManager(self.app) self.assertIsInstance(plugin_manager, PluginManager)
def test_init_app(self): plugin_manager = PluginManager() plugin_manager.init_app(self.app) self.assertIsInstance(plugin_manager, PluginManager)