From d5edcd02b49f98f8338b4151ce0ad1461f779e3c Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 1 Oct 2024 11:45:23 -0400 Subject: [PATCH] WIP: maybe dont want, more ps testing --- test/unit/app/tools/test_populate_state.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/unit/app/tools/test_populate_state.py b/test/unit/app/tools/test_populate_state.py index 9e31067c17eb..2dad23f37f3f 100644 --- a/test/unit/app/tools/test_populate_state.py +++ b/test/unit/app/tools/test_populate_state.py @@ -65,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")