Example #1
0
    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()
Example #2
0
# 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()
Example #3
0
    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
Example #4
0
 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()
Example #5
0
 def test_class_init(self):
     plugin_manager = PluginManager(self.app)
     self.assertIsInstance(plugin_manager, PluginManager)
Example #6
0
    def test_init_app(self):
        plugin_manager = PluginManager()
        plugin_manager.init_app(self.app)

        self.assertIsInstance(plugin_manager, PluginManager)