MCPcopy
hub / github.com/bugy/script-server / test_values_ui_mapping

Method test_values_ui_mapping

src/tests/executor_test.py:218–237  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

216 '''), output)
217
218 def test_values_ui_mapping(self):
219 config = create_config_model(
220 'config_x',
221 script_command='echo ',
222 parameters=[
223 create_script_param_config('p1', type='int', values_ui_mapping={'One': '1'}),
224 create_script_param_config('p2', type='list',
225 allowed_values=['abc'],
226 values_ui_mapping={'abc': 'qwerty'}),
227 ],
228 parameter_values={'p1': '1', 'p2': 'qwerty'})
229
230 executor._process_creator = create_process_wrapper
231 self.create_executor(config)
232 self.executor.start(123)
233
234 data = read_until_closed(self.executor.get_raw_output_stream(), 1000)
235 output = ''.join(data)
236
237 self.assertEqual('One abc\n', output)
238
239 def create_executor(self, config):
240 self.executor = ScriptExecutor(config, test_utils.env_variables)

Callers

nothing calls this directly

Calls 6

create_executorMethod · 0.95
create_config_modelFunction · 0.90
read_until_closedFunction · 0.90
startMethod · 0.45
get_raw_output_streamMethod · 0.45

Tested by

no test coverage detected