From f7fca72e8d5c60947c8b55313a37820918a0b76c Mon Sep 17 00:00:00 2001
From: Stefano Borini <sborini@enthought.com>
Date: Wed, 26 Jul 2017 18:40:48 +0100
Subject: [PATCH] Tested _import_extension function as well.

---
 force_bdss/bdss_application.py            |  2 --
 force_bdss/tests/test_bdss_application.py | 10 ++++++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/force_bdss/bdss_application.py b/force_bdss/bdss_application.py
index 00bcaab..9692874 100644
--- a/force_bdss/bdss_application.py
+++ b/force_bdss/bdss_application.py
@@ -37,8 +37,6 @@ class BDSSApplication(Application):
         else:
             plugins.append(CoreMCODriver())
 
-
-
         mgr = ExtensionManager(
             namespace='force.bdss.extensions',
             invoke_on_load=True,
diff --git a/force_bdss/tests/test_bdss_application.py b/force_bdss/tests/test_bdss_application.py
index ca09c52..86482c7 100644
--- a/force_bdss/tests/test_bdss_application.py
+++ b/force_bdss/tests/test_bdss_application.py
@@ -32,3 +32,13 @@ class TestBDSSApplication(unittest.TestCase):
                               "Exception. Message: hello")
         )
         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)
+
-- 
GitLab