Skip to content

Commit 4a8fd17

Browse files
committed
WIP: maybe dont want, more ps testing
1 parent f8ee350 commit 4a8fd17

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/unit/app/tools/test_populate_state.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
cast,
44
)
55

6+
from galaxy.app_unittest_utils.galaxy_mock import MockTrans
7+
from galaxy.app_unittest_utils.tools_support import UsesTools
8+
from galaxy.tool_util.unittest_utils import functional_test_tool_path
69
from galaxy.tools.parameters import (
710
populate_state,
811
ToolInputsT,
@@ -18,6 +21,7 @@
1821
)
1922
from galaxy.util import XML
2023
from galaxy.util.bunch import Bunch
24+
from galaxy.util.unittest import TestCase
2125

2226
trans = Bunch(workflow_building_mode=False)
2327

@@ -60,3 +64,18 @@ def test_populate_state():
6064
assert state_new["b"][0]["c"] == 2
6165
assert state_new["b"][0]["d"][0]["e"] == 3
6266
assert state_new["b"][0]["d"][0]["f"]["h"] == 4
67+
68+
69+
class TestMetadata(TestCase, UsesTools):
70+
def setUp(self):
71+
super().setUp()
72+
self.setup_app()
73+
self.trans = MockTrans(app=self.app)
74+
75+
def test_boolean_validation(self):
76+
source_file_name = functional_test_tool_path("parameters/gx_data_column.xml")
77+
tool = self._init_tool_for_path(source_file_name)
78+
incoming = {"ref_parameter": {"src": "hda", "id": 89}, "parameter": "m89"}
79+
state_new: dict[str, Any] = {}
80+
errors: dict[str, Any] = {}
81+
populate_state(self.trans, tool.inputs, incoming, state_new, errors=errors, check=True, input_format="21.01")

0 commit comments

Comments
 (0)