diff --git a/config/plugins/visualizations/common/templates/script_entry_point.mako b/config/plugins/visualizations/common/templates/script_entry_point.mako index 677be72b02b5..d5a9946f9cf4 100644 --- a/config/plugins/visualizations/common/templates/script_entry_point.mako +++ b/config/plugins/visualizations/common/templates/script_entry_point.mako @@ -30,5 +30,5 @@ ## Add script tag <% script_src = script_attributes.get("src") %> <% script_type = script_attributes.get("type") or "module" %> - + diff --git a/lib/galaxy/app_unittest_utils/galaxy_mock.py b/lib/galaxy/app_unittest_utils/galaxy_mock.py index 95715c042543..47c44bd19384 100644 --- a/lib/galaxy/app_unittest_utils/galaxy_mock.py +++ b/lib/galaxy/app_unittest_utils/galaxy_mock.py @@ -430,8 +430,14 @@ def remove(self): class MockTemplateHelpers: - def js(*js_files): + def css(*css_files): pass - def css(*css_files): + def dumps(*kwargs): + return {} + + def js(*js_files): pass + + def url_for(*kwargs): + return "/" diff --git a/test/unit/app/visualizations/plugins/test_VisualizationsRegistry.py b/test/unit/app/visualizations/plugins/test_VisualizationsRegistry.py index 1c7f9707f047..7a95bf980589 100644 --- a/test/unit/app/visualizations/plugins/test_VisualizationsRegistry.py +++ b/test/unit/app/visualizations/plugins/test_VisualizationsRegistry.py @@ -15,7 +15,7 @@ glx_dir = galaxy_directory() template_cache_dir = os.path.join(glx_dir, "database", "compiled_templates") -addtional_templates_dir = os.path.join(glx_dir, "config", "plugins", "visualizations", "common", "templates") +additional_templates_dir = os.path.join(glx_dir, "config", "plugins", "visualizations", "common", "templates") vis_reg_path = "config/plugins/visualizations" config1 = """\ @@ -144,7 +144,7 @@ def test_script_entry(self): HistoryDatasetAssociation - + """ ) @@ -167,11 +167,11 @@ def test_script_entry(self): assert script_entry.serves_templates trans = galaxy_mock.MockTrans() - script_entry._set_up_template_plugin(mock_app_dir.root_path, [addtional_templates_dir]) - response = script_entry._render({}, trans=trans, embedded=True) + script_entry._set_up_template_plugin(mock_app_dir.root_path, [additional_templates_dir]) + response = script_entry.render(trans=trans, embedded=True) assert 'src="bler"' in response assert 'type="text/javascript"' in response - assert 'data-main="one"' in response + assert 'id="mycontainer"' in response mock_app_dir.remove()