Beispiel #1
0
 def setUp(self):
     plugins_dir = [
         os.path.join(os.path.dirname(__file__), 'plugins_for_loader')
     ]
     app = FakeApplication()
     self.loader = PluginLoader(app, plugins_dir, [self.used_plugin_class])
     app.get_plugins = lambda: self.loader.plugins
Beispiel #2
0
 def test_hook_suggestions_are_included(self):
     self.app = FakeApplication()
     self.app.namespace = Namespace(self.app.settings)
     library_manager = LibraryManager(':memory:')
     library_manager.create_database()
     library_manager.start()
     self.app.namespace.set_library_manager(library_manager)
     pl = ContentAssistPlugin(self.app, name='test')
     pl.register_content_assist_hook(pl._get_content_assist_values)
     self._assert_contains('foo')
     library_manager.stop()
Beispiel #3
0
 def setUp(self):
     plugins_dir = [os.path.join(os.path.dirname(__file__), "plugins_for_loader")]
     app = FakeApplication()
     self.loader = PluginLoader(app, plugins_dir, [self.used_plugin_class])
     app.get_plugins = lambda: self.loader.plugins
 def _create_app(self):
     app = FakeApplication()
     settings = Settings(self._settings_path)
     settings.add_section('Plugins')
     app.settings = settings
     return app
Beispiel #5
0
 def _create_app(self):
     app = FakeApplication()
     settings = Settings(self._settings_path)
     settings.add_section('Plugins')
     app.settings = settings
     return app