'should allow loading_point to rel. import GALAXY modules'

def test_import_w_galaxy_import(self):

    mock_app_dir = galaxy_mock.MockDir({'plugins': {'plugin1': {loading_point: contents4}}})
    mock_app = galaxy_mock.MockApp(root=mock_app_dir.root_path)
    plugin_mgr = HookPluginManager(mock_app, directories_setting='plugins', skip_bad_plugins=False)
    app_path = mock_app_dir.root_path
    expected_plugins_path = os.path.join(app_path, 'plugins')
    self.assertEqual(plugin_mgr.directories, [expected_plugins_path])
    self.assertEqual(list(plugin_mgr.plugins.keys()), ['plugin1'])
    plugin = plugin_mgr.plugins['plugin1']
    self.assertEqual(plugin.name, 'plugin1')
    self.assertEqual(plugin.path, os.path.join(expected_plugins_path, 'plugin1'))
    self.assertIsInstance(plugin.module, types.ModuleType)
    self.assertEqual(plugin.module.blah('one,two'), ['one', 'two'])
    mock_app_dir.remove()
