mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 13:50:20 +08:00
Try to unit test more of DictParser in Viz component.
Changed a little during 22.01 release cycle - making sure did not regress.
This commit is contained in:
@@ -32,6 +32,13 @@ config1 = """\
|
||||
<params>
|
||||
<param type="dataset" var_name_in_template="hda" required="true">dataset_id</param>
|
||||
</params>
|
||||
<specs>
|
||||
<exports>
|
||||
<exports>png</exports>
|
||||
<exports>svg</exports>
|
||||
<exports>pdf</exports>
|
||||
</exports>
|
||||
</specs>
|
||||
<template>scatterplot.mako</template>
|
||||
</visualization>
|
||||
"""
|
||||
@@ -121,6 +128,16 @@ class VisualizationsRegistry_TestCase(VisualizationsBase_TestCase):
|
||||
self.assertEqual(vis1.template_path, os.path.join(vis1.path, 'templates'))
|
||||
self.assertEqual(vis1.template_lookup.__class__.__name__, 'TemplateLookup')
|
||||
|
||||
vis1_as_dict = vis1.to_dict()
|
||||
assert vis1_as_dict["specs"]
|
||||
specs = vis1_as_dict["specs"]
|
||||
assert "exports" in specs
|
||||
exports = specs["exports"]
|
||||
assert len(exports) == 3
|
||||
assert "png" in exports
|
||||
assert "svg" in exports
|
||||
assert "pdf" in exports
|
||||
|
||||
vis2 = plugin_mgr.plugins['vis2']
|
||||
self.assertEqual(vis2.name, 'vis2')
|
||||
self.assertEqual(vis2.path, os.path.join(expected_plugins_path, 'vis2'))
|
||||
|
||||
Reference in New Issue
Block a user