Files
galaxy/test/unit/tools/test_tool_panel.py
T
Nicola Soranzo 21b44bf348 Fix all E201 and E202 style errors
using the following command:
```
autopep8 -i -r --exclude $(sed -e 's|^|./|' -e 's|/$||' .ci/flake8_blacklist.txt | paste -sd,) --select E201,E202 .
```
2017-08-17 11:35:39 +01:00

28 lines
668 B
Python

from xml.etree import ElementTree as ET
from galaxy.tools.toolbox import ToolSection
def test_tool_section():
elem = ET.Element('section')
elem.attrib['name'] = "Cool Tools"
elem.attrib['id'] = "cool1"
section = ToolSection(elem)
assert section.id == "cool1"
assert section.name == "Cool Tools"
assert section.version == ""
section = ToolSection(dict(
id="cool1",
name="Cool Tools"
))
assert section.id == "cool1"
assert section.name == "Cool Tools"
assert section.version == ""
section = ToolSection()
assert section.id == ""
assert section.name == ""
assert section.version == ""