MCPcopy Create free account
hub / github.com/StackStorm/st2 / side_effect

Method side_effect

st2client/tests/unit/test_interactive.py:350–362  ·  view source on GitHub ↗
(msg, **kwargs)

Source from the content-addressed store, hash-verified

348 self.is_continued = False
349
350 def side_effect(msg, **kwargs):
351 if re.match(r"^~~~ Would you like to add another item to.*", msg):
352 # prompt requires the input to judge continuing setting, or not
353 if not self.is_continued:
354 # continuing the configuration only once
355 self.is_continued = True
356 return ""
357 else:
358 # finishing to configuration
359 return "n"
360 else:
361 # prompt requires the input of property value in the object
362 return "value"
363
364 prompt_mock.side_effect = side_effect
365 results = Reader.read()

Callers

nothing calls this directly

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected