2019-12-25 20:44:56 +01:00
|
|
|
from tiramisu import ChoiceOption, StrOption, OptionDescription, Calculation, ParamValue, ParamOption, Params, calc_value
|
2019-04-08 08:41:33 +02:00
|
|
|
|
|
|
|
def get_description():
|
|
|
|
"""generate description for this test
|
|
|
|
"""
|
|
|
|
option1 = ChoiceOption('choice', "Choice description", ("hide", "show"), default='hide', properties=('mandatory',))
|
2019-12-25 20:44:56 +01:00
|
|
|
hidden_property = Calculation(calc_value,
|
|
|
|
Params(ParamValue('hidden'),
|
|
|
|
kwargs={'condition': ParamOption(option1, todict=True),
|
|
|
|
'expected': ParamValue('hide')}))
|
|
|
|
option2 = StrOption('unicode2', "Unicode 2", properties=(hidden_property,))
|
2019-04-08 08:41:33 +02:00
|
|
|
descr1 = OptionDescription("options", "Common configuration", [option1, option2])
|
|
|
|
descr = OptionDescription("choice1_requires", "Choice with requirement", [descr1])
|
|
|
|
return descr
|