From 5ebe04cfd0aee7678d15da19fd2dd8a8437b4094 Mon Sep 17 00:00:00 2001 From: Carl Eberhard Date: Thu, 16 Apr 2015 10:45:24 -0400 Subject: [PATCH] Testing: fix failing unit tests that were recently added --- lib/galaxy/web/base/pluginframework.py | 10 +++++----- test/unit/managers/test_HistoryManager.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/galaxy/web/base/pluginframework.py b/lib/galaxy/web/base/pluginframework.py index 3a82aad659b..c3c9ccbd29d 100644 --- a/lib/galaxy/web/base/pluginframework.py +++ b/lib/galaxy/web/base/pluginframework.py @@ -15,7 +15,7 @@ import imp import pkg_resources pkg_resources.require( 'MarkupSafe' ) pkg_resources.require( 'Mako' ) -import mako +import mako.lookup from galaxy import util from galaxy.util import odict @@ -590,12 +590,12 @@ class PageServingPluginManager( PluginManager ): :returns: rendered template """ if 'plugin_path' not in kwargs: - kwargs[ 'plugin_path'] = os.path.abspath( plugin.path ) + kwargs[ 'plugin_path' ] = os.path.abspath( plugin.path ) - plugin_type = plugin.config["plugin_type"] - if plugin_type == "interactive_environment": + plugin_config = plugin.get( 'config', {} ) + if plugin_config.get( 'plugin_type', 'visualization' ) == "interactive_environment": request = InteractiveEnviornmentRequest(trans, plugin) - kwargs["ie_request"] = request + kwargs[ "ie_request" ] = request # defined here to be overridden return trans.fill_template( template_filename, template_lookup=plugin.template_lookup, **kwargs ) diff --git a/test/unit/managers/test_HistoryManager.py b/test/unit/managers/test_HistoryManager.py index 318980a9117..98a81f07f05 100644 --- a/test/unit/managers/test_HistoryManager.py +++ b/test/unit/managers/test_HistoryManager.py @@ -459,7 +459,7 @@ class HistoryFiltersTestCase( BaseTestCase ): self.assertEqual( len( filters ), 3 ) self.log( 'values should be parsed' ) - self.assertEqual( filters[1].right.value, True ) + self.assertTrue( isinstance( filters[1].right, sqlalchemy.sql.elements.True_ ) ) def test_parse_filters_invalid_filters( self ): self.log( 'should error on non-column attr')