Files
galaxy/test/unit/app/tools/util.py
T
Nicola Soranzo c35d8f2a06 Replace `unittest.TestCase` with pytest-based partial re-implementation
Also:
- Rename `FooBarTestCase` test classes as `TestFooBar`. These were collected
  by pytest only because they were `unittest.TestCase` derived, but normally
  pytest collects only test classes whose name starts with `Test`, see
  https://docs.pytest.org/en/7.1.x/reference/reference.html#confval-python_classes
2022-09-27 03:34:58 +01:00

24 lines
655 B
Python

from galaxy import model
from galaxy.app_unittest_utils.tools_support import UsesApp
from galaxy.tools.parameters import basic
from galaxy.util import (
bunch,
XML,
)
from galaxy.util.unittest import TestCase
class BaseParameterTestCase(TestCase, UsesApp):
def setUp(self):
self.setup_app()
self.mock_tool = bunch.Bunch(
app=self.app,
tool_type="default",
valid_input_states=model.Dataset.valid_input_states,
)
def _parameter_for(self, **kwds):
content = kwds["xml"]
param_xml = XML(content)
return basic.ToolParameter.build(self.mock_tool, param_xml)