Skip to content
Snippets Groups Projects
Commit f7fca72e authored by Stefano Borini's avatar Stefano Borini
Browse files

Tested _import_extension function as well.

parent 0a98a47d
No related branches found
No related tags found
1 merge request!50Introduced logging in case of plugin load error
...@@ -37,8 +37,6 @@ class BDSSApplication(Application): ...@@ -37,8 +37,6 @@ class BDSSApplication(Application):
else: else:
plugins.append(CoreMCODriver()) plugins.append(CoreMCODriver())
mgr = ExtensionManager( mgr = ExtensionManager(
namespace='force.bdss.extensions', namespace='force.bdss.extensions',
invoke_on_load=True, invoke_on_load=True,
......
...@@ -32,3 +32,13 @@ class TestBDSSApplication(unittest.TestCase): ...@@ -32,3 +32,13 @@ class TestBDSSApplication(unittest.TestCase):
"Exception. Message: hello") "Exception. Message: hello")
) )
self.assertEqual(plugins, []) self.assertEqual(plugins, [])
def test_import_extension(self):
plugins = []
plugin = mock.Mock()
ext = mock.Mock()
ext.obj = plugin
_import_extensions(plugins, ext)
self.assertEqual(plugins[0], plugin)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment