Skip to content

Commit

Permalink
WIP: maybe dont want, more ps testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Oct 8, 2024
1 parent e10e8c2 commit 53ee3dd
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/unit/app/tools/test_populate_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
Dict,
)

from galaxy.app_unittest_utils.galaxy_mock import MockTrans
from galaxy.app_unittest_utils.tools_support import UsesTools
from galaxy.tool_util.unittest_utils import functional_test_tool_path
from galaxy.tools.parameters import (
populate_state,
ToolInputsT,
Expand All @@ -19,6 +22,7 @@
)
from galaxy.util import XML
from galaxy.util.bunch import Bunch
from galaxy.util.unittest import TestCase

trans = Bunch(workflow_building_mode=False)

Expand Down Expand Up @@ -61,3 +65,18 @@ def test_populate_state():
assert state_new["b"][0]["c"] == 2
assert state_new["b"][0]["d"][0]["e"] == 3
assert state_new["b"][0]["d"][0]["f"]["h"] == 4


class TestMetadata(TestCase, UsesTools):
def setUp(self):
super().setUp()
self.setup_app()
self.trans = MockTrans(app=self.app)

def test_boolean_validation(self):
source_file_name = functional_test_tool_path("parameters/gx_data_column.xml")
tool = self._init_tool_for_path(source_file_name)
incoming = {"ref_parameter": {"src": "hda", "id": 89}, "parameter": "m89"}
state_new: Dict[str, Any] = {}
errors: Dict[str, Any] = {}
populate_state(self.trans, tool.inputs, incoming, state_new, errors=errors, check=True, input_format="21.01")

0 comments on commit 53ee3dd

Please sign in to comment.