def test_load_all_plugins(self):
        """ Test the plugins.load_all_plugins function. """
        all_plugins = plugins.load_all_plugins(self.session)
        backend_plugins = all_plugins["backends"]
        self.assertEqual(len(backend_plugins), len(EXPECTED_BACKENDS))
        backend_names = sorted(plugin.name for plugin in backend_plugins)
        self.assertEqual(sorted(backend_names), sorted(EXPECTED_BACKENDS))

        ecosystem_plugins = all_plugins["ecosystems"]
        ecosystems = dict((plugin.name, plugin.default_backend)
                          for plugin in ecosystem_plugins)
        self.assertEqual(ecosystems, EXPECTED_ECOSYSTEMS)
Exemple #2
0
    def test_load_all_plugins(self):
        """ Test the plugins.load_all_plugins function. """
        all_plugins = plugins.load_all_plugins(self.session)
        backend_plugins = all_plugins["backends"]
        self.assertEqual(len(backend_plugins), len(EXPECTED_BACKENDS))
        backend_names = sorted(plugin.name for plugin in backend_plugins)
        self.assertEqual(sorted(backend_names), sorted(EXPECTED_BACKENDS))

        ecosystem_plugins = all_plugins["ecosystems"]
        ecosystems = dict((plugin.name, plugin.default_backend)
                              for plugin in ecosystem_plugins)
        self.assertEqual(ecosystems, EXPECTED_ECOSYSTEMS)