''

def test_plugin_load(self):

    mock_app_dir = galaxy_mock.MockDir({'plugins': {'vis1': {'config': {'vis1.xml': config1}, 'static': {}, 'templates': {}}, 'vis2': {'config': {'vis2.xml': config1}}, 'not_a_vis1': {'config': {'vis1.xml': 'blerbler'}}, 'not_a_vis2': {}, 'not_a_vis3': 'blerbler', 'not_a_vis4': {'config': {'not_a_vis4.xml': 'blerbler'}}, 'not_a_vis5': {'static': {}, 'templates': {}}}})
    mock_app = galaxy_mock.MockApp(root=mock_app_dir.root_path)
    plugin_mgr = VisualizationsRegistry(mock_app, directories_setting='plugins', template_cache_dir=template_cache_dir)
    expected_plugins_path = os.path.join(mock_app_dir.root_path, 'plugins')
    expected_plugin_names = ['vis1', 'vis2']
    self.assertEqual(plugin_mgr.base_url, 'visualizations')
    self.assertEqual(plugin_mgr.directories, [expected_plugins_path])
    self.assertEqual(sorted(plugin_mgr.plugins.keys()), expected_plugin_names)
    vis1 = plugin_mgr.plugins['vis1']
    self.assertEqual(vis1.name, 'vis1')
    self.assertEqual(vis1.path, os.path.join(expected_plugins_path, 'vis1'))
    self.assertEqual(vis1.base_url, '/'.join([plugin_mgr.base_url, vis1.name]))
    self.assertTrue(vis1.serves_static)
    self.assertEqual(vis1.static_path, os.path.join(vis1.path, 'static'))
    self.assertEqual(vis1.static_url, '/'.join([vis1.base_url, 'static']))
    self.assertTrue(vis1.serves_templates)
    self.assertEqual(vis1.template_path, os.path.join(vis1.path, 'templates'))
    self.assertEqual(vis1.template_lookup.__class__.__name__, 'TemplateLookup')
    vis2 = plugin_mgr.plugins['vis2']
    self.assertEqual(vis2.name, 'vis2')
    self.assertEqual(vis2.path, os.path.join(expected_plugins_path, 'vis2'))
    self.assertEqual(vis2.base_url, '/'.join([plugin_mgr.base_url, vis2.name]))
    self.assertFalse(vis2.serves_static)
    self.assertFalse(vis2.serves_templates)
    mock_app_dir.remove()
    template_cache_dir
