Compare commits
130 Commits
release/3.
...
develop
Author | SHA1 | Date | |
---|---|---|---|
ce0a46232d | |||
64017d5cd4 | |||
b0462a1e80 | |||
8b4af12217 | |||
a5b6352188 | |||
75a073455e | |||
87093da974 | |||
f7721a9775 | |||
33f9cbdc64 | |||
6084487d08 | |||
9576809543 | |||
af2d3eb3ce | |||
b76db42204 | |||
5858bcc00b | |||
200562d23c | |||
2f173af70f | |||
9a4faf391e | |||
e2d5a1c8aa | |||
0bb066a8b8 | |||
d3d4de7ae3 | |||
f0be02b80f | |||
b9107867c9 | |||
3b1dccd844 | |||
12174045a2 | |||
8972e796db | |||
29282d8ea3 | |||
668ed3ad37 | |||
da946baba6 | |||
0167f4e2d0 | |||
acc86bc49f | |||
7ebad5724e | |||
385160cabd | |||
99a422dad7 | |||
bfed49a11f | |||
c9e166f1d4 | |||
da87f40f12 | |||
3e0e7244ef | |||
e1fef11465 | |||
a269cbcc93 | |||
cd50225bad | |||
6910371779 | |||
afeedc1db6 | |||
ba23a144ce | |||
50d42624cc | |||
659243ba8f | |||
dc8010f0af | |||
96c76286db | |||
5c1d4afd56 | |||
c4572ec409 | |||
2f125cfc8c | |||
4b3ac5f350 | |||
2d7729612b | |||
86a48ce9f1 | |||
f437bb78f3 | |||
f7bd6e3a47 | |||
d71018a88e | |||
2d2e8a63fb | |||
6929d2740d | |||
f1651848d2 | |||
ad6ed0a648 | |||
6b33bddbac | |||
91c44b38bc | |||
3bef45c9db | |||
746fa0134f | |||
1861dc59d4 | |||
52ddd76b1a | |||
503d4b2cca | |||
76e7fd93b2 | |||
0cb69f7a85 | |||
fb93c0cf6f | |||
4e04082cec | |||
d958b9dfad | |||
d9c0b18404 | |||
9cc4518087 | |||
cdcb155acc | |||
27838e67a3 | |||
8345a4651d | |||
b6c11c08db | |||
358a49c0e2 | |||
212fd5f16d | |||
323d1b83d6 | |||
709c0bf228 | |||
1bcad4d7ed | |||
13c0c0e256 | |||
ce297ed804 | |||
973b81d339 | |||
9d5bae9305 | |||
8fa91abefb | |||
d3e99cc9a5 | |||
6b77b0c5ad | |||
c5d8e0055b | |||
7325f6e12f | |||
15669372db | |||
74e604478e | |||
5c3a133928 | |||
e62268c46a | |||
c75425c03a | |||
a7e4399ae5 | |||
ba5cc57166 | |||
280d2ebd0a | |||
42291aec51 | |||
fd50913466 | |||
f976c31233 | |||
06ad839468 | |||
bb2ecc94d9 | |||
7c641961d3 | |||
4321bde399 | |||
c15dac8093 | |||
82a91db16e | |||
5ff47ac5c9 | |||
a9ca9fdb6a | |||
b6ec77aa23 | |||
2d7d237e19 | |||
113b7a3410 | |||
1691e38db5 | |||
c5ce9be699 | |||
613ae47573 | |||
fd18af62ca | |||
34d71901d0 | |||
35ef218c9c | |||
a33c7ed41e | |||
73d45f54cf | |||
69384a5e69 | |||
e73f3d1e47 | |||
d3eef77c03 | |||
fb1286e50e | |||
83f05197fb | |||
55da00f131 | |||
516a5a7219 | |||
620e8bbf2e |
30
ChangeLog
30
ChangeLog
@ -1,3 +1,33 @@
|
|||||||
|
Mon Apr 1 11:47:30 2019 +0200 Emmanuel Garette <egarette@cadoles.com>
|
||||||
|
* version 3.0 rc16
|
||||||
|
* tiramisu is now async
|
||||||
|
* add postgresql storage
|
||||||
|
|
||||||
|
Mon Sep 2 14:10:40 2019 +0200 Emmanuel Garette <egarette@cadoles.com>
|
||||||
|
* version 3.0 rc15
|
||||||
|
* add parents method to MetaConfig
|
||||||
|
|
||||||
|
Wed Aug 28 15:50:30 2019 +0200 Emmanuel Garette <egarette@cadoles.com>
|
||||||
|
* version 3.0 rc14
|
||||||
|
* correction in metaconfig_prefix
|
||||||
|
* correction in validation with parent
|
||||||
|
|
||||||
|
Mon Aug 21 14:24:42 2019 +0200 Emmanuel Garette <egarette@cadoles.com>
|
||||||
|
* version 3.0 rc12
|
||||||
|
* prefix metaconfig_prefix with current name
|
||||||
|
|
||||||
|
Mon Aug 19 08:02:27 2019 +0200 Emmanuel Garette <egarette@cadoles.com>
|
||||||
|
* version 3.0 rc11
|
||||||
|
* Config could have multiple parents
|
||||||
|
* todict works with Metaconfig
|
||||||
|
* separate Cache from values and settings
|
||||||
|
|
||||||
|
Fri Jul 26 09:43:03 2019 +0200 Emmanuel Garette <egarette@cadoles.com>
|
||||||
|
* version 3.0 rc9 and rc10
|
||||||
|
* better todict support (especially for leadership
|
||||||
|
* can add display_name method to Config init to change the name a
|
||||||
|
option in errors
|
||||||
|
|
||||||
Mon Jun 5 14:49:27 2019 +0200 Emmanuel Garette <egarette@cadoles.com>
|
Mon Jun 5 14:49:27 2019 +0200 Emmanuel Garette <egarette@cadoles.com>
|
||||||
* version 3.0 rc7
|
* version 3.0 rc7
|
||||||
* retrieve metaconfig/mixconfig/config by name in a metaconfig/mixconfig
|
* retrieve metaconfig/mixconfig/config by name in a metaconfig/mixconfig
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
[build-system]
|
|
||||||
requires = ["flit"]
|
|
||||||
build-backend = "flit.buildapi"
|
|
||||||
|
|
||||||
[tool.flit.metadata]
|
|
||||||
module = "tiramisu"
|
|
||||||
author = "Emmanuel Garette"
|
|
||||||
author-email = "gnunux@gnunux.info"
|
|
||||||
home-page = "https://framagit.org/tiramisu/tiramisu"
|
|
||||||
classifiers = [
|
|
||||||
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
|
|
||||||
"Programming Language :: Python :: 3",
|
|
||||||
"Natural Language :: English",
|
|
||||||
"Natural Language :: French",
|
|
||||||
"Operating System :: OS Independent",
|
|
||||||
]
|
|
||||||
requires-python = ">=3.5"
|
|
16
setup.py
16
setup.py
@ -1,13 +1,17 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup
|
||||||
from os.path import dirname, abspath, join, normpath, isdir
|
|
||||||
from os import listdir
|
|
||||||
import os
|
import os
|
||||||
from tiramisu import __version__
|
from tiramisu import __version__
|
||||||
|
|
||||||
|
|
||||||
PACKAGE_NAME = os.environ.get('PACKAGE_DST', 'tiramisu')
|
ORI_PACKAGE_NAME = 'tiramisu'
|
||||||
|
PACKAGE_NAME = os.environ.get('PACKAGE_DST', ORI_PACKAGE_NAME)
|
||||||
|
|
||||||
|
if PACKAGE_NAME != ORI_PACKAGE_NAME:
|
||||||
|
package_dir = {PACKAGE_NAME: ORI_PACKAGE_NAME}
|
||||||
|
else:
|
||||||
|
package_dir = None
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
version=__version__,
|
version=__version__,
|
||||||
@ -17,6 +21,7 @@ setup(
|
|||||||
description='an options controller tool',
|
description='an options controller tool',
|
||||||
url='https://framagit.org/tiramisu/tiramisu',
|
url='https://framagit.org/tiramisu/tiramisu',
|
||||||
license='GNU Library or Lesser General Public License (LGPL)',
|
license='GNU Library or Lesser General Public License (LGPL)',
|
||||||
|
provides=['tiramisu_api'],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
|
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
|
||||||
@ -41,5 +46,6 @@ producing flexible and fast options access.
|
|||||||
This version requires Python 3.5 or later.
|
This version requires Python 3.5 or later.
|
||||||
""",
|
""",
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
packages=find_packages(include=['tiramisu'])
|
package_dir=package_dir,
|
||||||
|
packages=[PACKAGE_NAME],
|
||||||
)
|
)
|
||||||
|
@ -10,7 +10,7 @@ from .autopath import do_autopath
|
|||||||
do_autopath()
|
do_autopath()
|
||||||
from tiramisu import Config, MetaConfig, \
|
from tiramisu import Config, MetaConfig, \
|
||||||
StrOption, SymLinkOption, OptionDescription, Leadership, DynOptionDescription, \
|
StrOption, SymLinkOption, OptionDescription, Leadership, DynOptionDescription, \
|
||||||
submulti, undefined, owners, Params, ParamOption
|
submulti, undefined, owners, Params, ParamOption, Calculation
|
||||||
from tiramisu.error import PropertiesOptionError, APIError, ConfigError, LeadershipError
|
from tiramisu.error import PropertiesOptionError, APIError, ConfigError, LeadershipError
|
||||||
ICON = u'\u2937'
|
ICON = u'\u2937'
|
||||||
|
|
||||||
@ -191,8 +191,9 @@ def _getproperties(multi, isfollower, kwargs):
|
|||||||
# define properties
|
# define properties
|
||||||
properties = copy(PROPERTIES_LIST)
|
properties = copy(PROPERTIES_LIST)
|
||||||
if multi and not isfollower:
|
if multi and not isfollower:
|
||||||
default_props = ['empty']
|
default_props = ['empty', 'unique']
|
||||||
properties.append('empty')
|
properties.append('empty')
|
||||||
|
properties.append('unique')
|
||||||
else:
|
else:
|
||||||
default_props = []
|
default_props = []
|
||||||
extra_properties = kwargs.get('extra_properties')
|
extra_properties = kwargs.get('extra_properties')
|
||||||
@ -248,8 +249,9 @@ def _property_permissive(cfg, mcfg, pathread, pathwrite, confread, confwrite, **
|
|||||||
# define properties
|
# define properties
|
||||||
properties = copy(PROPERTIES_LIST)
|
properties = copy(PROPERTIES_LIST)
|
||||||
if multi and not isfollower:
|
if multi and not isfollower:
|
||||||
default_props = ['empty']
|
default_props = ['empty', 'unique']
|
||||||
properties.append('empty')
|
properties.append('empty')
|
||||||
|
properties.append('unique')
|
||||||
else:
|
else:
|
||||||
default_props = []
|
default_props = []
|
||||||
extra_properties = kwargs.get('extra_properties')
|
extra_properties = kwargs.get('extra_properties')
|
||||||
@ -662,8 +664,11 @@ def autocheck_append_value(cfg, mcfg, pathread, pathwrite, confread, confwrite,
|
|||||||
with warnings.catch_warnings(record=True) as w:
|
with warnings.catch_warnings(record=True) as w:
|
||||||
if not kwargs.get('propertyerror', False):
|
if not kwargs.get('propertyerror', False):
|
||||||
leader_value = cfg_.forcepermissive.option(pathread).value.get()
|
leader_value = cfg_.forcepermissive.option(pathread).value.get()
|
||||||
|
v3 = cfg_.forcepermissive.option(pathread).value.get()
|
||||||
len_value = len(leader_value)
|
len_value = len(leader_value)
|
||||||
leader_value.append(undefined)
|
leader_value.append(undefined)
|
||||||
|
print('debut', leader_value, cfg_._config_bag.context._impl_values_cache._cache['odleader.first'][None][0])
|
||||||
|
print(id(leader_value), id(cfg_._config_bag.context._impl_values_cache._cache['odleader.first'][None][0]))
|
||||||
assert len(cfg_.forcepermissive.option(pathread).value.get()) == len_value
|
assert len(cfg_.forcepermissive.option(pathread).value.get()) == len_value
|
||||||
with warnings.catch_warnings(record=True) as w:
|
with warnings.catch_warnings(record=True) as w:
|
||||||
cfg2_.forcepermissive.option(pathread).value.set(leader_value)
|
cfg2_.forcepermissive.option(pathread).value.set(leader_value)
|
||||||
@ -683,7 +688,12 @@ def autocheck_append_value(cfg, mcfg, pathread, pathwrite, confread, confwrite,
|
|||||||
value = 'value'
|
value = 'value'
|
||||||
else:
|
else:
|
||||||
value = ['value']
|
value = ['value']
|
||||||
|
print('==>>>')
|
||||||
|
print(leader_value, cfg_._config_bag.context._impl_values_cache._cache['odleader.first'][None][0])
|
||||||
|
print(id(leader_value), id(cfg_._config_bag.context._impl_values_cache._cache['odleader.first'][None][0]))
|
||||||
leader_value.append(value)
|
leader_value.append(value)
|
||||||
|
print(leader_value, cfg_._config_bag.context._impl_values_cache._cache['odleader.first'][None][0])
|
||||||
|
print(id(leader_value), id(cfg_._config_bag.context._impl_values_cache._cache['odleader.first'][None][0]))
|
||||||
assert len(cfg_.forcepermissive.option(pathread).value.get()) == len(new_leader_value)
|
assert len(cfg_.forcepermissive.option(pathread).value.get()) == len(new_leader_value)
|
||||||
cfg2_.forcepermissive.option(pathread).value.set(leader_value)
|
cfg2_.forcepermissive.option(pathread).value.set(leader_value)
|
||||||
assert cfg_.forcepermissive.option(pathread).value.get()[-1] == value
|
assert cfg_.forcepermissive.option(pathread).value.get()[-1] == value
|
||||||
@ -949,8 +959,6 @@ def autocheck_default_owner_with_value_permissive(cfg, mcfg, pathread, pathwrite
|
|||||||
else:
|
else:
|
||||||
assert cfg_.forcepermissive.option(pathread, 0).owner.isdefault() is True
|
assert cfg_.forcepermissive.option(pathread, 0).owner.isdefault() is True
|
||||||
assert cfg_.forcepermissive.option(pathread, 1).owner.isdefault() is False
|
assert cfg_.forcepermissive.option(pathread, 1).owner.isdefault() is False
|
||||||
#FIXME else:
|
|
||||||
# raises(PropertiesOptionError, "cfg.config(conf).forcepermissive.option(pathread).owner.isdefault()")
|
|
||||||
do(confwrite)
|
do(confwrite)
|
||||||
if confwrite != confread:
|
if confwrite != confread:
|
||||||
do(confread)
|
do(confread)
|
||||||
@ -1194,7 +1202,7 @@ def autocheck_find(cfg, mcfg, pathread, pathwrite, confread, confwrite, **kwargs
|
|||||||
do(confwrite)
|
do(confwrite)
|
||||||
|
|
||||||
|
|
||||||
def check_all(cfg, paths_, path, meta, multi, default, default_multi, require, consistency, callback, symlink, weakrefs, **kwargs):
|
def check_all(cfg, paths_, path, meta, multi, default, default_multi, require, callback, symlink, weakrefs, **kwargs):
|
||||||
def _build_make_dict():
|
def _build_make_dict():
|
||||||
dico = {}
|
dico = {}
|
||||||
dico_value = {}
|
dico_value = {}
|
||||||
@ -1286,31 +1294,6 @@ def check_all(cfg, paths_, path, meta, multi, default, default_multi, require, c
|
|||||||
if symlink:
|
if symlink:
|
||||||
dico['extraoptrequirelink'] = 'value'
|
dico['extraoptrequirelink'] = 'value'
|
||||||
dico_value['extraoptrequirelink'] = 'value'
|
dico_value['extraoptrequirelink'] = 'value'
|
||||||
if consistency and has_value:
|
|
||||||
cpath = list(dico.keys())[0]
|
|
||||||
if "." in cpath:
|
|
||||||
cpath = cpath.rsplit('.', 1)[0] + '.'
|
|
||||||
else:
|
|
||||||
cpath = ''
|
|
||||||
if multi:
|
|
||||||
value = []
|
|
||||||
else:
|
|
||||||
value = None
|
|
||||||
if is_dyn:
|
|
||||||
dico[cpath + 'extraoptconsistencyval1'] = value
|
|
||||||
dico_value[cpath + 'extraoptconsistencyval1'] = value
|
|
||||||
if is_leader:
|
|
||||||
spath = cpath.split('.')
|
|
||||||
spath[-2] = spath[-2][:-1] + '2'
|
|
||||||
spath[-3] = spath[-3][:-1] + '2'
|
|
||||||
npath = '.'.join(spath) + 'extraoptconsistencyval2'
|
|
||||||
else:
|
|
||||||
npath = cpath[:-2] + '2.' + 'extraoptconsistencyval2'
|
|
||||||
dico[npath] = value
|
|
||||||
dico_value[npath] = value
|
|
||||||
else:
|
|
||||||
dico[cpath + 'extraoptconsistency'] = value
|
|
||||||
dico_value[cpath + 'extraoptconsistency'] = value
|
|
||||||
if is_leader:
|
if is_leader:
|
||||||
for cpath in list(paths_.keys())[len(dyns):]:
|
for cpath in list(paths_.keys())[len(dyns):]:
|
||||||
if cpath.endswith('.first') or cpath.endswith('.firstval1') or cpath.endswith('.firstval2'):
|
if cpath.endswith('.first') or cpath.endswith('.firstval1') or cpath.endswith('.firstval2'):
|
||||||
@ -1374,8 +1357,6 @@ def check_all(cfg, paths_, path, meta, multi, default, default_multi, require, c
|
|||||||
text += u' with default multi'
|
text += u' with default multi'
|
||||||
if require:
|
if require:
|
||||||
text += u' with requirement'
|
text += u' with requirement'
|
||||||
if consistency:
|
|
||||||
text += u' with consistency'
|
|
||||||
text += u', kwargs: {}'.format(kwargs)
|
text += u', kwargs: {}'.format(kwargs)
|
||||||
print(text)
|
print(text)
|
||||||
if not require:
|
if not require:
|
||||||
@ -1530,7 +1511,7 @@ def check_deref(weakrefs):
|
|||||||
assert wrf() is None
|
assert wrf() is None
|
||||||
|
|
||||||
|
|
||||||
def make_conf(options, multi, default, default_multi, require, consistency, callback, symlink):
|
def make_conf(options, multi, default, default_multi, require, callback, symlink):
|
||||||
weakrefs = []
|
weakrefs = []
|
||||||
dyn = []
|
dyn = []
|
||||||
goptions = []
|
goptions = []
|
||||||
@ -1593,7 +1574,8 @@ def make_conf(options, multi, default, default_multi, require, consistency, call
|
|||||||
if callback:
|
if callback:
|
||||||
largs = [path + 'call', "{}'s callback option".format(path)]
|
largs = [path + 'call', "{}'s callback option".format(path)]
|
||||||
objcall = tiramisu_option(*largs, **call_kwargs)
|
objcall = tiramisu_option(*largs, **call_kwargs)
|
||||||
kwargs['callback_params'] = Params(ParamOption(objcall))
|
kwargs['default'] = Calculation(kwargs['callback'], Params(ParamOption(objcall)))
|
||||||
|
del kwargs['callback']
|
||||||
else:
|
else:
|
||||||
objcall = None
|
objcall = None
|
||||||
if symlink and not path.endswith('extraoptconsistency'):
|
if symlink and not path.endswith('extraoptconsistency'):
|
||||||
@ -1603,16 +1585,8 @@ def make_conf(options, multi, default, default_multi, require, consistency, call
|
|||||||
tiramisu_option = SymLinkOption
|
tiramisu_option = SymLinkOption
|
||||||
else:
|
else:
|
||||||
sobj = None
|
sobj = None
|
||||||
|
print(args, kwargs)
|
||||||
obj = tiramisu_option(*args, **kwargs)
|
obj = tiramisu_option(*args, **kwargs)
|
||||||
if not 'extraopt' in path and consistency:
|
|
||||||
if require:
|
|
||||||
if symlink:
|
|
||||||
gopt = goptions[2]
|
|
||||||
else:
|
|
||||||
gopt = goptions[1]
|
|
||||||
else:
|
|
||||||
gopt = goptions[0]
|
|
||||||
obj.impl_add_consistency('not_equal', gopt, warnings_only=True, transitive=False)
|
|
||||||
return obj, objcall, sobj
|
return obj, objcall, sobj
|
||||||
|
|
||||||
def make_optiondescriptions(path, collected):
|
def make_optiondescriptions(path, collected):
|
||||||
@ -1632,7 +1606,7 @@ def make_conf(options, multi, default, default_multi, require, consistency, call
|
|||||||
if symlink:
|
if symlink:
|
||||||
return
|
return
|
||||||
optiondescription = DynOptionDescription
|
optiondescription = DynOptionDescription
|
||||||
kwargs['callback'] = return_list
|
kwargs['suffixes'] = Calculation(return_list)
|
||||||
dyn.append(path)
|
dyn.append(path)
|
||||||
options = []
|
options = []
|
||||||
if 'options' in collected:
|
if 'options' in collected:
|
||||||
@ -1651,17 +1625,10 @@ def make_conf(options, multi, default, default_multi, require, consistency, call
|
|||||||
return obj
|
return obj
|
||||||
|
|
||||||
collect_options = {}
|
collect_options = {}
|
||||||
if require or consistency:
|
if require:
|
||||||
noptions = OrderedDict()
|
noptions = OrderedDict()
|
||||||
if require:
|
if require:
|
||||||
noptions['extraoptrequire'] = {}
|
noptions['extraoptrequire'] = {}
|
||||||
if consistency:
|
|
||||||
subpath = list(options.keys())[0]
|
|
||||||
if '.' in subpath:
|
|
||||||
subpath = subpath.rsplit('.', 1)[0] + '.'
|
|
||||||
else:
|
|
||||||
subpath = ''
|
|
||||||
noptions[subpath + 'extraoptconsistency'] = {}
|
|
||||||
noptions.update(options)
|
noptions.update(options)
|
||||||
else:
|
else:
|
||||||
noptions = options
|
noptions = options
|
||||||
@ -1812,53 +1779,48 @@ def test_options(paths):
|
|||||||
|
|
||||||
lpaths = list(paths.keys())
|
lpaths = list(paths.keys())
|
||||||
|
|
||||||
for meta in (False, True):
|
# for meta in (False, True):
|
||||||
for callback in (False, True):
|
# for callback in (False, True):
|
||||||
for consistency in (False, True):
|
# for require in (False, True):
|
||||||
for require in (False, True):
|
# for default_multi in (False, True):
|
||||||
for default_multi in (False, True):
|
# for symlink in (False, True):
|
||||||
for symlink in (False, True):
|
# if callback and default_multi:
|
||||||
if callback and default_multi:
|
# continue
|
||||||
continue
|
# for default in (False, True):
|
||||||
for default in (False, True):
|
# for multi in (False, True, submulti):
|
||||||
for multi in (False, True, submulti):
|
for meta in (False,):
|
||||||
pass
|
for callback in (False,):
|
||||||
# for meta in (True,):
|
for require in (False,):
|
||||||
# for callback in (False,):
|
for default_multi in (False,):
|
||||||
# for consistency in (True,):
|
for symlink in (False,):
|
||||||
# for require in (True,):
|
if callback and default_multi:
|
||||||
# for default_multi in (True,):
|
continue
|
||||||
# for symlink in (False,):
|
for default in (False,):
|
||||||
# if callback and default_multi:
|
for multi in (True,):
|
||||||
# continue
|
if multi is submulti and default:
|
||||||
# for default in (True,):
|
continue
|
||||||
# for multi in (submulti,):
|
if multi is False and default_multi:
|
||||||
if multi is submulti and default:
|
continue
|
||||||
continue
|
cfg, weakrefs, dyn = make_conf(paths, multi, default, default_multi, require, callback, symlink)
|
||||||
if multi is submulti and consistency:
|
if cfg is None:
|
||||||
continue
|
continue
|
||||||
if multi is False and default_multi:
|
if dyn:
|
||||||
continue
|
cnt = 0
|
||||||
cfg, weakrefs, dyn = make_conf(paths, multi, default, default_multi, require, consistency, callback, symlink)
|
idx = 0
|
||||||
if cfg is None:
|
for index, lpath in enumerate(lpaths):
|
||||||
continue
|
if paths[lpath]:
|
||||||
if dyn:
|
cnt += 1
|
||||||
cnt = 0
|
else:
|
||||||
idx = 0
|
check_all(cfg, paths, lpaths[index], meta, multi, default,
|
||||||
for index, lpath in enumerate(lpaths):
|
default_multi, require, callback, symlink,
|
||||||
if paths[lpath]:
|
weakrefs, **get_kwargs(lpaths[idx]))
|
||||||
cnt += 1
|
idx += 1
|
||||||
else:
|
if idx == cnt:
|
||||||
check_all(cfg, paths, lpaths[index], meta, multi, default,
|
idx = 0
|
||||||
default_multi, require, consistency, callback, symlink,
|
else:
|
||||||
weakrefs, **get_kwargs(lpaths[idx]))
|
for lpath in lpaths:
|
||||||
idx += 1
|
check_all(cfg, paths, lpath, meta, multi, default,
|
||||||
if idx == cnt:
|
default_multi, require, callback, symlink,
|
||||||
idx = 0
|
weakrefs, **get_kwargs(lpath))
|
||||||
else:
|
del cfg
|
||||||
for lpath in lpaths:
|
check_deref(weakrefs)
|
||||||
check_all(cfg, paths, lpath, meta, multi, default,
|
|
||||||
default_multi, require, consistency, callback, symlink,
|
|
||||||
weakrefs, **get_kwargs(lpath))
|
|
||||||
del cfg
|
|
||||||
check_deref(weakrefs)
|
|
||||||
|
85
tests/config.py
Normal file
85
tests/config.py
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
# from json import dumps, loads
|
||||||
|
import asyncio
|
||||||
|
from os import environ
|
||||||
|
try:
|
||||||
|
from tiramisu_api import Config
|
||||||
|
class TestConfig(Config):
|
||||||
|
def __init__(self,
|
||||||
|
config):
|
||||||
|
self.test_option = config.option
|
||||||
|
json = self.test_option.dict()
|
||||||
|
# assert json == loads(dumps(json))
|
||||||
|
super().__init__(json)
|
||||||
|
|
||||||
|
def send_data(self,
|
||||||
|
updates):
|
||||||
|
return self.updates_data(self.test_option.updates(updates))
|
||||||
|
PARAMS = ['tiramisu', 'tiramisu-api']
|
||||||
|
except:
|
||||||
|
PARAMS = ['tiramisu']
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
async def get_config(config, type, error=False):
|
||||||
|
if type == 'tiramisu':
|
||||||
|
return config
|
||||||
|
if error:
|
||||||
|
await config.property.add('demoting_error_warning')
|
||||||
|
return TestConfig(config)
|
||||||
|
|
||||||
|
|
||||||
|
def value_list(values):
|
||||||
|
if values[0] == '':
|
||||||
|
del values[0]
|
||||||
|
return tuple(values)
|
||||||
|
|
||||||
|
|
||||||
|
async def global_owner(config, config_type):
|
||||||
|
return await config.owner.get()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(params=PARAMS)
|
||||||
|
def config_type(request):
|
||||||
|
return request.param
|
||||||
|
|
||||||
|
|
||||||
|
LOOP = None
|
||||||
|
@pytest.fixture(scope='session')
|
||||||
|
def event_loop(request):
|
||||||
|
"""Create an instance of the default event loop for each test case."""
|
||||||
|
global LOOP
|
||||||
|
if LOOP is None:
|
||||||
|
LOOP = asyncio.get_event_loop_policy().new_event_loop()
|
||||||
|
return LOOP
|
||||||
|
|
||||||
|
|
||||||
|
async def _delete_sessions(meta):
|
||||||
|
if await meta.config.type() != 'config':
|
||||||
|
for conf in await meta.config.list():
|
||||||
|
await _delete_sessions(conf)
|
||||||
|
await meta.session.reset()
|
||||||
|
|
||||||
|
|
||||||
|
async def delete_sessions(confs):
|
||||||
|
if not isinstance(confs, list):
|
||||||
|
confs = [confs]
|
||||||
|
for conf in confs:
|
||||||
|
await _delete_sessions(conf)
|
||||||
|
if environ.get('TIRAMISU_STORAGE') == 'postgres':
|
||||||
|
async with confs[0]._config_bag.context.getconnection() as connection:
|
||||||
|
assert await connection.fetchrow('SELECT * FROM session') is None
|
||||||
|
assert await connection.fetchrow('SELECT * FROM value') is None
|
||||||
|
assert await connection.fetchrow('SELECT * FROM information') is None
|
||||||
|
assert await connection.fetchrow('SELECT * FROM property') is None
|
||||||
|
assert await connection.fetchrow('SELECT * FROM permissive') is None
|
||||||
|
elif environ.get('TIRAMISU_STORAGE') == 'sqlite3':
|
||||||
|
async with confs[0]._config_bag.context.getconnection() as connection:
|
||||||
|
assert await connection.select('SELECT * FROM session') is None
|
||||||
|
assert await connection.select('SELECT * FROM value') is None
|
||||||
|
assert await connection.select('SELECT * FROM information') is None
|
||||||
|
assert await connection.select('SELECT * FROM property') is None
|
||||||
|
assert await connection.select('SELECT * FROM permissive') is None
|
||||||
|
else:
|
||||||
|
from tiramisu import list_sessions
|
||||||
|
assert not await list_sessions()
|
@ -12,7 +12,26 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"model": {},
|
"model": {},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
|
"options.boolean": {
|
||||||
|
"clearable": true
|
||||||
|
},
|
||||||
"null": [
|
"null": [
|
||||||
{
|
{
|
||||||
"title": "Configurer",
|
"title": "Configurer",
|
||||||
|
@ -16,7 +16,26 @@
|
|||||||
"readOnly": true
|
"readOnly": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
|
"options.boolean": {
|
||||||
|
"clearable": true
|
||||||
|
},
|
||||||
"null": [
|
"null": [
|
||||||
{
|
{
|
||||||
"title": "Configurer",
|
"title": "Configurer",
|
||||||
|
@ -17,8 +17,25 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"model": {},
|
"model": {},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.choice": {
|
"options.choice": {
|
||||||
|
"clearable": true,
|
||||||
"type": "choice"
|
"type": "choice"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -21,8 +21,25 @@
|
|||||||
"readOnly": true
|
"readOnly": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.choice": {
|
"options.choice": {
|
||||||
|
"clearable": true,
|
||||||
"type": "choice"
|
"type": "choice"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -54,20 +54,43 @@
|
|||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
"options.choice1.choice1": {
|
"options.choice1.choice1": {
|
||||||
"required": true
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.choice1.choice1": {
|
"options.choice1.choice1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "choice"
|
"type": "choice"
|
||||||
},
|
},
|
||||||
"options.choice1.choice2": {
|
"options.choice1.choice2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "choice"
|
"type": "choice"
|
||||||
},
|
},
|
||||||
"options.choice1.choice3": {
|
"options.choice1.choice3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "choice"
|
"type": "choice"
|
||||||
},
|
},
|
||||||
"options.choice1.choice4": {
|
"options.choice1.choice4": {
|
||||||
|
"clearable": true,
|
||||||
"type": "choice"
|
"type": "choice"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -54,26 +54,48 @@
|
|||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
"options.choice1.choice1": {
|
"options.choice1.choice1": {
|
||||||
"required": true
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"options.choice1.choice3": {
|
"options.choice1.choice3": {
|
||||||
"null": {
|
"null": {
|
||||||
"display": false,
|
"display": false
|
||||||
"hidden": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.choice1.choice1": {
|
"options.choice1.choice1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "choice"
|
"type": "choice"
|
||||||
},
|
},
|
||||||
"options.choice1.choice2": {
|
"options.choice1.choice2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "choice"
|
"type": "choice"
|
||||||
},
|
},
|
||||||
"options.choice1.choice3": {
|
"options.choice1.choice3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "choice"
|
"type": "choice"
|
||||||
},
|
},
|
||||||
"options.choice1.choice4": {
|
"options.choice1.choice4": {
|
||||||
|
"clearable": true,
|
||||||
"type": "choice"
|
"type": "choice"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -55,6 +55,9 @@
|
|||||||
"model": {
|
"model": {
|
||||||
"options.choice1.choice1": {
|
"options.choice1.choice1": {
|
||||||
"required": true,
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"choice 2"
|
"choice 2"
|
||||||
],
|
],
|
||||||
@ -67,17 +70,37 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.choice1.choice1": {
|
"options.choice1.choice1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "choice"
|
"type": "choice"
|
||||||
},
|
},
|
||||||
"options.choice1.choice2": {
|
"options.choice1.choice2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "choice"
|
"type": "choice"
|
||||||
},
|
},
|
||||||
"options.choice1.choice3": {
|
"options.choice1.choice3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "choice"
|
"type": "choice"
|
||||||
},
|
},
|
||||||
"options.choice1.choice4": {
|
"options.choice1.choice4": {
|
||||||
|
"clearable": true,
|
||||||
"type": "choice"
|
"type": "choice"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -16,10 +16,10 @@ def get_description():
|
|||||||
return descr
|
return descr
|
||||||
|
|
||||||
|
|
||||||
def get_values(api, allpath=False):
|
async def get_values(api, allpath=False):
|
||||||
if allpath:
|
if allpath:
|
||||||
root = 'choice1_leadership_value.'
|
root = 'choice1_leadership_value.'
|
||||||
else:
|
else:
|
||||||
root = ''
|
root = ''
|
||||||
api.option(root + 'options.choice1.choice1').value.set(['choice 2'])
|
await api.option(root + 'options.choice1.choice1').value.set(['choice 2'])
|
||||||
api.option(root + 'options.choice1.choice2', 0).value.set('choice 4')
|
await api.option(root + 'options.choice1.choice2', 0).value.set('choice 4')
|
||||||
|
@ -18,11 +18,31 @@
|
|||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
"options.choice": {
|
"options.choice": {
|
||||||
"required": true
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.choice": {
|
"options.choice": {
|
||||||
|
"clearable": true,
|
||||||
"type": "choice"
|
"type": "choice"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -17,8 +17,25 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"model": {},
|
"model": {},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.choice": {
|
"options.choice": {
|
||||||
|
"clearable": true,
|
||||||
"type": "choice",
|
"type": "choice",
|
||||||
"displayed": {
|
"displayed": {
|
||||||
"choice 1": "renamed 1",
|
"choice 1": "renamed 1",
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"options.choice": {
|
"options.choice": {
|
||||||
"type": "choice",
|
"type": "choice",
|
||||||
"value": "hide",
|
|
||||||
"enum": [
|
"enum": [
|
||||||
"hide",
|
"hide",
|
||||||
"show"
|
"show"
|
||||||
],
|
],
|
||||||
|
"value": "hide",
|
||||||
"title": "Choice description"
|
"title": "Choice description"
|
||||||
},
|
},
|
||||||
"options.unicode2": {
|
"options.unicode2": {
|
||||||
@ -23,13 +23,29 @@
|
|||||||
"model": {
|
"model": {
|
||||||
"options.choice": {
|
"options.choice": {
|
||||||
"required": true,
|
"required": true,
|
||||||
"value": "hide",
|
"value": "hide"
|
||||||
"owner": "default"
|
|
||||||
},
|
},
|
||||||
"options.unicode2": {
|
"options.unicode2": {
|
||||||
|
"display": false,
|
||||||
"hidden": true
|
"hidden": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.choice": {
|
"options.choice": {
|
||||||
"clearable": true,
|
"clearable": true,
|
||||||
@ -41,13 +57,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"expected": {
|
"expected": {
|
||||||
"hide": {
|
"show": {
|
||||||
"hide": [
|
"show": [
|
||||||
"options.unicode2"
|
"options.unicode2"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"show": {
|
"hide": {
|
||||||
"show": [
|
"hide": [
|
||||||
"options.unicode2"
|
"options.unicode2"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -55,6 +71,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"options.unicode2": {
|
"options.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
from tiramisu.option import ChoiceOption, StrOption, OptionDescription
|
from tiramisu import ChoiceOption, StrOption, OptionDescription, Calculation, ParamValue, ParamOption, Params, calc_value
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option1 = ChoiceOption('choice', "Choice description", ("hide", "show"), default='hide', properties=('mandatory',))
|
option1 = ChoiceOption('choice', "Choice description", ("hide", "show"), default='hide', properties=('mandatory',))
|
||||||
option2 = StrOption('unicode2', "Unicode 2", requires=[{'option': option1,
|
hidden_property = Calculation(calc_value,
|
||||||
'expected': 'hide',
|
Params(ParamValue('hidden'),
|
||||||
'action': 'hidden'}])
|
kwargs={'condition': ParamOption(option1, todict=True),
|
||||||
|
'expected': ParamValue('hide')}))
|
||||||
|
option2 = StrOption('unicode2', "Unicode 2", properties=(hidden_property,))
|
||||||
descr1 = OptionDescription("options", "Common configuration", [option1, option2])
|
descr1 = OptionDescription("options", "Common configuration", [option1, option2])
|
||||||
descr = OptionDescription("choice1_requires", "Choice with requirement", [descr1])
|
descr = OptionDescription("choice1_requires", "Choice with requirement", [descr1])
|
||||||
return descr
|
return descr
|
||||||
|
@ -12,7 +12,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"model": {},
|
"model": {},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
|
"options.date": {
|
||||||
|
"clearable": true,
|
||||||
|
"remote": true
|
||||||
|
},
|
||||||
"null": [
|
"null": [
|
||||||
{
|
{
|
||||||
"title": "Configurer",
|
"title": "Configurer",
|
||||||
|
@ -16,7 +16,27 @@
|
|||||||
"readOnly": true
|
"readOnly": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
|
"options.date": {
|
||||||
|
"clearable": true,
|
||||||
|
"remote": true
|
||||||
|
},
|
||||||
"null": [
|
"null": [
|
||||||
{
|
{
|
||||||
"title": "Configurer",
|
"title": "Configurer",
|
||||||
|
@ -10,8 +10,25 @@
|
|||||||
"required": true
|
"required": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"usbpath": {
|
"usbpath": {
|
||||||
|
"clearable": true,
|
||||||
"pattern": "^[a-zA-Z0-9\\-\\._~/+]+$",
|
"pattern": "^[a-zA-Z0-9\\-\\._~/+]+$",
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
|
@ -24,20 +24,40 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"model": {},
|
"model": {},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.hostname1": {
|
"options.hostname1": {
|
||||||
|
"clearable": true,
|
||||||
"pattern": "^((?!-)[a-z0-9-]{1,63}\\.){1,}[a-z0-9-]{1,63}$",
|
"pattern": "^((?!-)[a-z0-9-]{1,63}\\.){1,}[a-z0-9-]{1,63}$",
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.hostname2": {
|
"options.hostname2": {
|
||||||
|
"clearable": true,
|
||||||
"pattern": "^((?!-)[a-z0-9-]{0,63}\\.){0,}[a-z0-9-]{1,63}$",
|
"pattern": "^((?!-)[a-z0-9-]{0,63}\\.){0,}[a-z0-9-]{1,63}$",
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.hostname3": {
|
"options.hostname3": {
|
||||||
|
"clearable": true,
|
||||||
"pattern": "^(?:((?!-)[a-z0-9-]{1,63})|(?:(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)))$",
|
"pattern": "^(?:((?!-)[a-z0-9-]{1,63})|(?:(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)))$",
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.hostname4": {
|
"options.hostname4": {
|
||||||
|
"clearable": true,
|
||||||
"pattern": "^((?!-)[a-z0-9-]{1,15})$",
|
"pattern": "^((?!-)[a-z0-9-]{1,15})$",
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
|
@ -5,8 +5,8 @@ def get_description():
|
|||||||
"""
|
"""
|
||||||
option1 = DomainnameOption('hostname1', "Domainname Description")
|
option1 = DomainnameOption('hostname1', "Domainname Description")
|
||||||
option2 = DomainnameOption('hostname2', "Domainname without dot Description", allow_without_dot=True)
|
option2 = DomainnameOption('hostname2', "Domainname without dot Description", allow_without_dot=True)
|
||||||
option3 = DomainnameOption('hostname3', "Hostname or IP Description", type_='hostname', allow_ip=True)
|
option3 = DomainnameOption('hostname3', "Hostname or IP Description", type='hostname', allow_ip=True)
|
||||||
option4 = DomainnameOption('hostname4', "Netbios Description", type_='netbios')
|
option4 = DomainnameOption('hostname4', "Netbios Description", type='netbios')
|
||||||
descr1 = OptionDescription("options", "Common configuration", [option1, option2, option3, option4])
|
descr1 = OptionDescription("options", "Common configuration", [option1, option2, option3, option4])
|
||||||
descr = OptionDescription("hostname1", "Simple hostnames", [descr1])
|
descr = OptionDescription("hostname1", "Simple hostnames", [descr1])
|
||||||
return descr
|
return descr
|
||||||
|
@ -12,9 +12,26 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"model": {},
|
"model": {},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.ip": {
|
"options.ip": {
|
||||||
"pattern": "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$",
|
"clearable": true,
|
||||||
|
"remote": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -16,9 +16,26 @@
|
|||||||
"readOnly": true
|
"readOnly": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.ip": {
|
"options.ip": {
|
||||||
"pattern": "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$",
|
"clearable": true,
|
||||||
|
"remote": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -12,8 +12,25 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"model": {},
|
"model": {},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.mail": {
|
"options.mail": {
|
||||||
|
"clearable": true,
|
||||||
"pattern": "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$",
|
"pattern": "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$",
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
|
@ -12,8 +12,25 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"model": {},
|
"model": {},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.integer": {
|
"options.integer": {
|
||||||
|
"clearable": true,
|
||||||
"pattern": "^[0-9]+$",
|
"pattern": "^[0-9]+$",
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
|
@ -16,8 +16,25 @@
|
|||||||
"readOnly": true
|
"readOnly": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.integer": {
|
"options.integer": {
|
||||||
|
"clearable": true,
|
||||||
"pattern": "^[0-9]+$",
|
"pattern": "^[0-9]+$",
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
|
@ -18,6 +18,22 @@
|
|||||||
"owner": "user"
|
"owner": "user"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.integer": {
|
"options.integer": {
|
||||||
"clearable": true,
|
"clearable": true,
|
||||||
|
@ -10,9 +10,9 @@ def get_description():
|
|||||||
return descr
|
return descr
|
||||||
|
|
||||||
|
|
||||||
def get_values(api, allpath=False):
|
async def get_values(api, allpath=False):
|
||||||
if allpath:
|
if allpath:
|
||||||
root = 'number1_mod_value.'
|
root = 'number1_mod_value.'
|
||||||
else:
|
else:
|
||||||
root = ''
|
root = ''
|
||||||
api.option(root + 'options.integer').value.set(3)
|
await api.option(root + 'options.integer').value.set(3)
|
||||||
|
@ -14,10 +14,25 @@
|
|||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
"options.integer": {
|
"options.integer": {
|
||||||
"value": 0,
|
"value": 0
|
||||||
"owner": "default"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.integer": {
|
"options.integer": {
|
||||||
"clearable": true,
|
"clearable": true,
|
||||||
|
@ -12,8 +12,25 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"model": {},
|
"model": {},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -16,8 +16,25 @@
|
|||||||
"readOnly": true
|
"readOnly": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -34,23 +34,52 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode": {
|
||||||
"display": false,
|
"display": false,
|
||||||
|
"properties": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"options.unicode.unicode": {
|
||||||
"required": true,
|
"required": true,
|
||||||
"hidden": true
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
|
"hidden": true,
|
||||||
|
"display": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode1": {
|
"options.unicode.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode2": {
|
"options.unicode.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode3": {
|
"options.unicode.unicode3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu.option import StrOption, OptionDescription
|
||||||
from tiramisu import Leadership
|
from tiramisu import Leadership
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option = UnicodeOption('unicode', "Unicode leader", multi=True, properties=('hidden',))
|
option = StrOption('unicode', "Unicode leader", multi=True)
|
||||||
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
|
option1 = StrOption('unicode1', "Unicode follower 1", multi=True)
|
||||||
option2 = UnicodeOption('unicode2', "Unicode follower 2", multi=True)
|
option2 = StrOption('unicode2', "Unicode follower 2", multi=True)
|
||||||
option3 = UnicodeOption('unicode3', "Unicode follower 3", multi=True)
|
option3 = StrOption('unicode3', "Unicode follower 3", multi=True)
|
||||||
descr1 = Leadership("unicode", "Common configuration",
|
descr1 = Leadership("unicode", "Common configuration",
|
||||||
[option, option1, option2, option3])
|
[option, option1, option2, option3], properties=('hidden',))
|
||||||
descr = OptionDescription("options", "Common configuration", [descr1])
|
descr = OptionDescription("options", "Common configuration", [descr1])
|
||||||
descr = OptionDescription("unicode1_leader_hidden_followers", "Leader follower with unicode and hidden leader", [descr])
|
descr = OptionDescription("unicode1_leader_hidden_followers", "Leader follower with unicode and hidden leader", [descr])
|
||||||
return descr
|
return descr
|
||||||
|
@ -35,20 +35,43 @@
|
|||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
"required": true
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode1": {
|
"options.unicode.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode2": {
|
"options.unicode.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode3": {
|
"options.unicode.unicode3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription, Leadership
|
from tiramisu.option import StrOption, OptionDescription, Leadership
|
||||||
|
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option = UnicodeOption('unicode', "Unicode leader", multi=True)
|
option = StrOption('unicode', "Unicode leader", multi=True)
|
||||||
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
|
option1 = StrOption('unicode1', "Unicode follower 1", multi=True)
|
||||||
option2 = UnicodeOption('unicode2', "Unicode follower 2", multi=True)
|
option2 = StrOption('unicode2', "Unicode follower 2", multi=True)
|
||||||
option3 = UnicodeOption('unicode3', "Unicode follower 3", multi=True)
|
option3 = StrOption('unicode3', "Unicode follower 3", multi=True)
|
||||||
descr1 = Leadership("unicode", "Common configuration 1",
|
descr1 = Leadership("unicode", "Common configuration 1",
|
||||||
[option, option1, option2, option3])
|
[option, option1, option2, option3])
|
||||||
descr = OptionDescription("options", "Common configuration 2", [descr1])
|
descr = OptionDescription("options", "Common configuration 2", [descr1])
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
"isMulti": true,
|
||||||
"value": [
|
"value": [
|
||||||
"val1",
|
"val1",
|
||||||
"val2"
|
"val2"
|
||||||
],
|
],
|
||||||
"isMulti": true,
|
|
||||||
"title": "Unicode leader"
|
"title": "Unicode leader"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode1": {
|
"options.unicode.unicode1": {
|
||||||
@ -20,7 +20,7 @@
|
|||||||
},
|
},
|
||||||
"options.unicode.unicode2": {
|
"options.unicode.unicode2": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "follower2",
|
"defaultmulti": "follower2",
|
||||||
"isMulti": true,
|
"isMulti": true,
|
||||||
"title": "Unicode follower 2 with default multi"
|
"title": "Unicode follower 2 with default multi"
|
||||||
},
|
},
|
||||||
@ -41,29 +41,46 @@
|
|||||||
"model": {
|
"model": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
"required": true,
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"val1",
|
"val1",
|
||||||
"val2"
|
"val2"
|
||||||
],
|
]
|
||||||
"owner": "default"
|
|
||||||
},
|
},
|
||||||
"options.unicode.unicode2": {
|
"options.unicode.unicode2": {
|
||||||
"0": {
|
"0": {
|
||||||
"value": "follower2",
|
"value": "follower2"
|
||||||
"owner": "default"
|
|
||||||
},
|
},
|
||||||
"1": {
|
"1": {
|
||||||
"value": "follower2",
|
"value": "follower2"
|
||||||
"owner": "default"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
"clearable": true,
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode1": {
|
"options.unicode.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode2": {
|
"options.unicode.unicode2": {
|
||||||
@ -71,6 +88,7 @@
|
|||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode3": {
|
"options.unicode.unicode3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu.option import StrOption, OptionDescription
|
||||||
from tiramisu import Leadership
|
from tiramisu import Leadership
|
||||||
from tiramisu.setting import groups
|
from tiramisu.setting import groups
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option = UnicodeOption('unicode', "Unicode leader", ['val1', 'val2'], multi=True)
|
option = StrOption('unicode', "Unicode leader", ['val1', 'val2'], multi=True)
|
||||||
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
|
option1 = StrOption('unicode1', "Unicode follower 1", multi=True)
|
||||||
option2 = UnicodeOption('unicode2', "Unicode follower 2 with default multi", default_multi="follower2", multi=True)
|
option2 = StrOption('unicode2', "Unicode follower 2 with default multi", default_multi="follower2", multi=True)
|
||||||
option3 = UnicodeOption('unicode3', "Unicode follower 3", multi=True)
|
option3 = StrOption('unicode3', "Unicode follower 3", multi=True)
|
||||||
descr1 = Leadership("unicode", "Common configuration 1",
|
descr1 = Leadership("unicode", "Common configuration 1",
|
||||||
[option, option1, option2, option3])
|
[option, option1, option2, option3])
|
||||||
descr = OptionDescription("options", "Common configuration 2", [descr1])
|
descr = OptionDescription("options", "Common configuration 2", [descr1])
|
||||||
|
@ -36,6 +36,9 @@
|
|||||||
"model": {
|
"model": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
"required": true,
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"val1",
|
"val1",
|
||||||
"val2"
|
"val2"
|
||||||
@ -54,22 +57,41 @@
|
|||||||
"hidden": true
|
"hidden": true
|
||||||
},
|
},
|
||||||
"null": {
|
"null": {
|
||||||
"display": false,
|
"display": false
|
||||||
"hidden": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode1": {
|
"options.unicode.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode2": {
|
"options.unicode.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode3": {
|
"options.unicode.unicode3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu.option import StrOption, OptionDescription
|
||||||
from tiramisu import Leadership
|
from tiramisu import Leadership
|
||||||
|
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option = UnicodeOption('unicode', "Unicode leader", multi=True)
|
option = StrOption('unicode', "Unicode leader", multi=True)
|
||||||
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
|
option1 = StrOption('unicode1', "Unicode follower 1", multi=True)
|
||||||
option2 = UnicodeOption('unicode2', "Unicode follower 2 hidden", multi=True, properties=('hidden',))
|
option2 = StrOption('unicode2', "Unicode follower 2 hidden", multi=True, properties=('hidden',))
|
||||||
option3 = UnicodeOption('unicode3', "Unicode follower 3", multi=True)
|
option3 = StrOption('unicode3', "Unicode follower 3", multi=True)
|
||||||
descr1 = Leadership("unicode", "Common configuration",
|
descr1 = Leadership("unicode", "Common configuration",
|
||||||
[option, option1, option2, option3])
|
[option, option1, option2, option3])
|
||||||
descr = OptionDescription("options", "Common configuration", [descr1])
|
descr = OptionDescription("options", "Common configuration", [descr1])
|
||||||
@ -16,10 +16,10 @@ def get_description():
|
|||||||
return descr
|
return descr
|
||||||
|
|
||||||
|
|
||||||
def get_values(api, allpath=False):
|
async def get_values(api, allpath=False):
|
||||||
if allpath:
|
if allpath:
|
||||||
root = 'unicode1_leadership_hidden.'
|
root = 'unicode1_leadership_hidden.'
|
||||||
else:
|
else:
|
||||||
root = ''
|
root = ''
|
||||||
api.option(root + 'options.unicode.unicode').value.set([u'val1', u'val2'])
|
await api.option(root + 'options.unicode.unicode').value.set([u'val1', u'val2'])
|
||||||
api.option(root + 'options.unicode.unicode2', 0).value.set(u'super')
|
await api.option(root + 'options.unicode.unicode2', 0).value.set(u'super')
|
||||||
|
@ -34,20 +34,43 @@
|
|||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
"options.unicode1.unicode1": {
|
"options.unicode1.unicode1": {
|
||||||
"required": true
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode1.unicode1": {
|
"options.unicode1.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode1.unicode2": {
|
"options.unicode1.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode1.unicode3": {
|
"options.unicode1.unicode3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu.option import StrOption, OptionDescription
|
||||||
from tiramisu import Leadership
|
from tiramisu import Leadership
|
||||||
|
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option = UnicodeOption('unicode', "Unicode leader")
|
option = StrOption('unicode', "Unicode leader")
|
||||||
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
|
option1 = StrOption('unicode1', "Unicode follower 1", multi=True)
|
||||||
option2 = UnicodeOption('unicode2', "Unicode follower 2", multi=True)
|
option2 = StrOption('unicode2', "Unicode follower 2", multi=True)
|
||||||
option3 = UnicodeOption('unicode3', "Unicode follower 3", multi=True)
|
option3 = StrOption('unicode3', "Unicode follower 3", multi=True)
|
||||||
descr1 = Leadership("unicode1", "Common configuration",
|
descr1 = Leadership("unicode1", "Common configuration",
|
||||||
[option1, option2, option3])
|
[option1, option2, option3])
|
||||||
descr = OptionDescription("options", "Common configuration", [option, descr1])
|
descr = OptionDescription("options", "Common configuration", [option, descr1])
|
||||||
|
@ -38,28 +38,52 @@
|
|||||||
"required": true
|
"required": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode1": {
|
"options.unicode.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode2": {
|
"options.unicode.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"not_equal": {
|
"not_equal": [
|
||||||
"options": [
|
{
|
||||||
"options.unicode.unicode3"
|
"options": [
|
||||||
]
|
"options.unicode.unicode3"
|
||||||
}
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"options.unicode.unicode3": {
|
"options.unicode.unicode3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"not_equal": {
|
"not_equal": [
|
||||||
"options": [
|
{
|
||||||
"options.unicode.unicode2"
|
"options": [
|
||||||
]
|
"options.unicode.unicode2"
|
||||||
}
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
{
|
{
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu.option import StrOption, OptionDescription
|
||||||
from tiramisu import Leadership
|
from tiramisu import Leadership
|
||||||
|
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option = UnicodeOption('unicode', "Unicode leader", multi=True)
|
option = StrOption('unicode', "Unicode leader", multi=True)
|
||||||
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
|
option1 = StrOption('unicode1', "Unicode follower 1", multi=True)
|
||||||
option2 = UnicodeOption('unicode2', "Unicode follower 2 not equal", multi=True)
|
option2 = StrOption('unicode2', "Unicode follower 2 not equal", multi=True)
|
||||||
option3 = UnicodeOption('unicode3', "Unicode follower 3 not equal", multi=True)
|
option3 = StrOption('unicode3', "Unicode follower 3 not equal", multi=True)
|
||||||
option2.impl_add_consistency('not_equal', option3)
|
option2.impl_add_consistency('not_equal', option3)
|
||||||
descr1 = Leadership("unicode", "Common configuration 1",
|
descr1 = Leadership("unicode", "Common configuration 1",
|
||||||
[option, option1, option2, option3])
|
[option, option1, option2, option3])
|
||||||
|
@ -35,17 +35,39 @@
|
|||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
"required": true
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode1": {
|
"options.unicode.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode2": {
|
"options.unicode.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"default": {
|
"default": {
|
||||||
@ -63,6 +85,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"options.unicode.unicode3": {
|
"options.unicode.unicode3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,18 +1,17 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu import StrOption, OptionDescription, Leadership, Calculation, ParamValue, ParamOption, Params, calc_value
|
||||||
from tiramisu import Leadership
|
|
||||||
|
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option = UnicodeOption('unicode', "Unicode leader", multi=True)
|
option = StrOption('unicode', "Unicode leader", multi=True)
|
||||||
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
|
option1 = StrOption('unicode1', "Unicode follower 1", multi=True)
|
||||||
option2 = UnicodeOption('unicode2', "Values 'test' must show 'Unicode follower 3'", multi=True)
|
option2 = StrOption('unicode2', "Values 'test' must show 'Unicode follower 3'", multi=True)
|
||||||
option3 = UnicodeOption('unicode3', "Unicode follower 3", requires=[{'option': option2,
|
hidden_property = Calculation(calc_value,
|
||||||
'expected': u'test',
|
Params(ParamValue('hidden'),
|
||||||
'action': 'hidden',
|
kwargs={'condition': ParamOption(option2, todict=True),
|
||||||
'inverse': True}],
|
'expected': ParamValue('test'),
|
||||||
multi=True)
|
'reverse_condition': ParamValue(True)}))
|
||||||
|
option3 = StrOption('unicode3', "Unicode follower 3", properties=(hidden_property,), multi=True)
|
||||||
descr1 = Leadership("unicode", "Common configuration 1",
|
descr1 = Leadership("unicode", "Common configuration 1",
|
||||||
[option, option1, option2, option3])
|
[option, option1, option2, option3])
|
||||||
descr = OptionDescription("options", "Common configuration 2", [descr1])
|
descr = OptionDescription("options", "Common configuration 2", [descr1])
|
||||||
|
@ -36,15 +36,36 @@
|
|||||||
"options.unicode1": {
|
"options.unicode1": {
|
||||||
"properties": [
|
"properties": [
|
||||||
"hidden"
|
"hidden"
|
||||||
],
|
]
|
||||||
"hidden": true
|
|
||||||
},
|
},
|
||||||
"options.unicode1.unicode1": {
|
"options.unicode1.unicode1": {
|
||||||
"required": true
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
|
"hidden": true,
|
||||||
|
"display": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"default": {
|
"default": {
|
||||||
@ -62,12 +83,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"options.unicode1.unicode1": {
|
"options.unicode1.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode1.unicode2": {
|
"options.unicode1.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode1.unicode3": {
|
"options.unicode1.unicode3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,19 +1,20 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu import StrOption, OptionDescription, Leadership, Calculation, ParamValue, ParamOption, Params, calc_value
|
||||||
from tiramisu import Leadership
|
|
||||||
|
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option = UnicodeOption('unicode', "Value 'test' must show Leadership")
|
option = StrOption('unicode', "Value 'test' must show Leadership")
|
||||||
option1 = UnicodeOption('unicode1', "Unicode leader", multi=True)
|
option1 = StrOption('unicode1', "Unicode leader", multi=True)
|
||||||
option2 = UnicodeOption('unicode2', "Unicode follower 1", multi=True)
|
option2 = StrOption('unicode2', "Unicode follower 1", multi=True)
|
||||||
option3 = UnicodeOption('unicode3', "Unicode follower 2", multi=True)
|
option3 = StrOption('unicode3', "Unicode follower 2", multi=True)
|
||||||
|
hidden_property = Calculation(calc_value,
|
||||||
|
Params(ParamValue('hidden'),
|
||||||
|
kwargs={'condition': ParamOption(option, todict=True),
|
||||||
|
'expected': ParamValue('test'),
|
||||||
|
'reverse_condition': ParamValue(True)}))
|
||||||
descr1 = Leadership("unicode1", "Common configuration",
|
descr1 = Leadership("unicode1", "Common configuration",
|
||||||
[option1, option2, option3], requires=[{'option': option,
|
[option1, option2, option3], properties=(hidden_property,))
|
||||||
'expected': u'test',
|
|
||||||
'action': 'hidden',
|
|
||||||
'inverse': True}])
|
|
||||||
descr = OptionDescription("options", "Common configuration", [option, descr1])
|
descr = OptionDescription("options", "Common configuration", [option, descr1])
|
||||||
descr = OptionDescription("unicode1_leadership_requires_all", "Leader follower with requirement", [descr])
|
descr = OptionDescription("unicode1_leadership_requires_all", "Leader follower with requirement", [descr])
|
||||||
return descr
|
return descr
|
||||||
|
132
tests/dict/data/unicode1_leadership_requires_disabled_value.json
Normal file
132
tests/dict/data/unicode1_leadership_requires_disabled_value.json
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
{
|
||||||
|
"schema": {
|
||||||
|
"options": {
|
||||||
|
"properties": {
|
||||||
|
"options.unicode": {
|
||||||
|
"properties": {
|
||||||
|
"options.unicode.unicode": {
|
||||||
|
"type": "string",
|
||||||
|
"isMulti": true,
|
||||||
|
"title": "Values 'test' must show 'Unicode follower 3'"
|
||||||
|
},
|
||||||
|
"options.unicode.unicode1": {
|
||||||
|
"type": "string",
|
||||||
|
"isMulti": true,
|
||||||
|
"title": "Unicode follower 1"
|
||||||
|
},
|
||||||
|
"options.unicode.unicode2": {
|
||||||
|
"type": "string",
|
||||||
|
"isMulti": true,
|
||||||
|
"title": "Unicode follower 2"
|
||||||
|
},
|
||||||
|
"options.unicode.unicode3": {
|
||||||
|
"type": "string",
|
||||||
|
"isMulti": true,
|
||||||
|
"title": "Unicode follower 3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "array",
|
||||||
|
"title": "Common configuration 1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object",
|
||||||
|
"title": "Common configuration 2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"model": {
|
||||||
|
"options.unicode.unicode": {
|
||||||
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
|
"value": [
|
||||||
|
"test",
|
||||||
|
"val2"
|
||||||
|
],
|
||||||
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"options.unicode.unicode1": {
|
||||||
|
"0": {
|
||||||
|
"value": "super1",
|
||||||
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
"value": "super2",
|
||||||
|
"owner": "user"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"options.unicode.unicode2": {
|
||||||
|
"0": {
|
||||||
|
"value": "pas test",
|
||||||
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
"value": "test",
|
||||||
|
"owner": "user"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"options.unicode.unicode3": {
|
||||||
|
"1": {
|
||||||
|
"hidden": true,
|
||||||
|
"display": false,
|
||||||
|
"value": "super",
|
||||||
|
"owner": "user"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"form": {
|
||||||
|
"options.unicode.unicode": {
|
||||||
|
"clearable": true,
|
||||||
|
"type": "input",
|
||||||
|
"dependencies": {
|
||||||
|
"default": {
|
||||||
|
"hide": [
|
||||||
|
"options.unicode.unicode3"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"expected": {
|
||||||
|
"test": {
|
||||||
|
"show": [
|
||||||
|
"options.unicode.unicode3"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"options.unicode.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
|
"type": "input"
|
||||||
|
},
|
||||||
|
"options.unicode.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
|
"type": "input"
|
||||||
|
},
|
||||||
|
"options.unicode.unicode3": {
|
||||||
|
"clearable": true,
|
||||||
|
"type": "input"
|
||||||
|
},
|
||||||
|
"null": [
|
||||||
|
{
|
||||||
|
"title": "Configurer",
|
||||||
|
"type": "submit"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"version": "1.0"
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
from tiramisu import StrOption, OptionDescription, Leadership, Calculation, ParamValue, ParamOption, Params, calc_value
|
||||||
|
|
||||||
|
|
||||||
|
def get_description():
|
||||||
|
"""generate description for this test
|
||||||
|
"""
|
||||||
|
option = StrOption('unicode', "Values 'test' must show 'Unicode follower 3'", multi=True)
|
||||||
|
option1 = StrOption('unicode1', "Unicode follower 1", multi=True)
|
||||||
|
option2 = StrOption('unicode2', "Unicode follower 2", multi=True)
|
||||||
|
disabled_property = Calculation(calc_value,
|
||||||
|
Params(ParamValue('disabled'),
|
||||||
|
kwargs={'condition': ParamOption(option, todict=True),
|
||||||
|
'expected': ParamValue('test'),
|
||||||
|
'reverse_condition': ParamValue(True)}))
|
||||||
|
option3 = StrOption('unicode3', "Unicode follower 3", properties=(disabled_property,), multi=True)
|
||||||
|
descr1 = Leadership("unicode", "Common configuration 1",
|
||||||
|
[option, option1, option2, option3])
|
||||||
|
descr = OptionDescription("options", "Common configuration 2", [descr1])
|
||||||
|
descr = OptionDescription("unicode1_leadership_requires_disabled_value", "Leader followers with Unicode follower 3 disabled when Unicode follower 2 is test and modified value", [descr])
|
||||||
|
return descr
|
||||||
|
|
||||||
|
|
||||||
|
async def get_values(api, allpath=False):
|
||||||
|
if allpath:
|
||||||
|
root = 'unicode1_leadership_requires_disabled_value.'
|
||||||
|
else:
|
||||||
|
root = ''
|
||||||
|
await api.option(root + 'options.unicode.unicode').value.set([u'test', u'val2'])
|
||||||
|
await api.option(root + 'options.unicode.unicode1', 0).value.set(u'super1')
|
||||||
|
await api.option(root + 'options.unicode.unicode1', 1).value.set(u'super2')
|
||||||
|
await api.option(root + 'options.unicode.unicode2', 0).value.set(u'pas test')
|
||||||
|
await api.option(root + 'options.unicode.unicode2', 1).value.set(u'test')
|
||||||
|
await api.option(root + 'options.unicode.unicode3', 1).value.set(u'super')
|
@ -30,11 +30,31 @@
|
|||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
"options.unicode1.unicode1": {
|
"options.unicode1.unicode1": {
|
||||||
"required": true
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode1.unicode1": {
|
"options.unicode1.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"default": {
|
"default": {
|
||||||
@ -52,9 +72,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"options.unicode1.unicode2": {
|
"options.unicode1.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode1.unicode3": {
|
"options.unicode1.unicode3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu import StrOption, OptionDescription, Leadership, Calculation, ParamValue, ParamOption, Params, calc_value
|
||||||
from tiramisu import Leadership
|
|
||||||
|
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option1 = UnicodeOption('unicode1', "Values 'test' must show 'Unicode follower 2'", multi=True)
|
option1 = StrOption('unicode1', "Values 'test' must show 'Unicode follower 2'", multi=True)
|
||||||
option2 = UnicodeOption('unicode2', "Unicode follower 1", multi=True)
|
option2 = StrOption('unicode2', "Unicode follower 1", multi=True)
|
||||||
option3 = UnicodeOption('unicode3', "Unicode follower 2", multi=True,
|
hidden_property = Calculation(calc_value,
|
||||||
requires=[{'option': option1,
|
Params(ParamValue('hidden'),
|
||||||
'expected': u'test',
|
kwargs={'condition': ParamOption(option1, todict=True),
|
||||||
'action': 'hidden',
|
'expected': ParamValue('test'),
|
||||||
'inverse': True}])
|
'reverse_condition': ParamValue(True)}))
|
||||||
|
option3 = StrOption('unicode3', "Unicode follower 2", multi=True, properties=(hidden_property,))
|
||||||
descr1 = Leadership("unicode1", "Common configuration",
|
descr1 = Leadership("unicode1", "Common configuration",
|
||||||
[option1, option2, option3])
|
[option1, option2, option3])
|
||||||
descr = OptionDescription("options", "Common configuration", [descr1])
|
descr = OptionDescription("options", "Common configuration", [descr1])
|
||||||
|
@ -31,6 +31,9 @@
|
|||||||
"model": {
|
"model": {
|
||||||
"options.unicode1.unicode1": {
|
"options.unicode1.unicode1": {
|
||||||
"required": true,
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"test",
|
"test",
|
||||||
"pas test"
|
"pas test"
|
||||||
@ -49,12 +52,30 @@
|
|||||||
"owner": "user"
|
"owner": "user"
|
||||||
},
|
},
|
||||||
"1": {
|
"1": {
|
||||||
"hidden": true
|
"hidden": true,
|
||||||
|
"display": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode1.unicode1": {
|
"options.unicode1.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"default": {
|
"default": {
|
||||||
@ -72,9 +93,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"options.unicode1.unicode2": {
|
"options.unicode1.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode1.unicode3": {
|
"options.unicode1.unicode3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,29 +1,29 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu import StrOption, OptionDescription, Leadership, Calculation, ParamValue, ParamOption, Params, calc_value
|
||||||
from tiramisu import Leadership
|
|
||||||
|
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option1 = UnicodeOption('unicode1', "Values 'test' must show 'Unicode follower 2'", multi=True)
|
option1 = StrOption('unicode1', "Values 'test' must show 'Unicode follower 2'", multi=True)
|
||||||
option2 = UnicodeOption('unicode2', "Unicode follower 1", multi=True)
|
option2 = StrOption('unicode2', "Unicode follower 1", multi=True)
|
||||||
option3 = UnicodeOption('unicode3', "Unicode follower 2", multi=True,
|
hidden_property = Calculation(calc_value,
|
||||||
requires=[{'option': option1,
|
Params(ParamValue('hidden'),
|
||||||
'expected': u'test',
|
kwargs={'condition': ParamOption(option1, todict=True),
|
||||||
'action': 'hidden',
|
'expected': ParamValue('test'),
|
||||||
'inverse': True}])
|
'reverse_condition': ParamValue(True)}))
|
||||||
|
option3 = StrOption('unicode3', "Unicode follower 2", multi=True, properties=(hidden_property,))
|
||||||
descr1 = Leadership("unicode1", "Common configuration",
|
descr1 = Leadership("unicode1", "Common configuration",
|
||||||
[option1, option2, option3])
|
[option1, option2, option3])
|
||||||
descr = OptionDescription("options", "Common configuration", [descr1])
|
descr = OptionDescription("options", "Common configuration", [descr1])
|
||||||
descr = OptionDescription("unicode1_leadership_requires_follower_value", "Leader follower requires follower with leader value", [descr])
|
descr = OptionDescription("unicode1_leadership_requires_follower_value", "Leader follower requires follower with leader", [descr])
|
||||||
return descr
|
return descr
|
||||||
|
|
||||||
|
|
||||||
def get_values(api, allpath=False):
|
async def get_values(api, allpath=False):
|
||||||
if allpath:
|
if allpath:
|
||||||
root = 'unicode1_leadership_requires_follower_value.'
|
root = 'unicode1_leadership_requires_follower_value.'
|
||||||
else:
|
else:
|
||||||
root = ''
|
root = ''
|
||||||
api.option(root + 'options.unicode1.unicode1').value.set([u'test', u'pas test'])
|
await api.option(root + 'options.unicode1.unicode1').value.set([u'test', u'pas test'])
|
||||||
api.option(root + 'options.unicode1.unicode2', 0).value.set(u'super1')
|
await api.option(root + 'options.unicode1.unicode2', 0).value.set(u'super1')
|
||||||
api.option(root + 'options.unicode1.unicode3', 0).value.set(u'super1')
|
await api.option(root + 'options.unicode1.unicode3', 0).value.set(u'super1')
|
||||||
|
@ -30,14 +30,35 @@
|
|||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
"options.unicode1.unicode1": {
|
"options.unicode1.unicode1": {
|
||||||
"required": true
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode1.unicode1": {
|
"options.unicode1.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode1.unicode2": {
|
"options.unicode1.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"default": {
|
"default": {
|
||||||
@ -55,6 +76,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"options.unicode1.unicode3": {
|
"options.unicode1.unicode3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu import StrOption, OptionDescription, Leadership, Calculation, ParamValue, ParamOption, Params, calc_value
|
||||||
from tiramisu import Leadership
|
|
||||||
|
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option1 = UnicodeOption('unicode1', "Unicode leader", multi=True)
|
option1 = StrOption('unicode1', "Unicode leader", multi=True)
|
||||||
option2 = UnicodeOption('unicode2', "Values 'test' must show 'Unicode follower 2'", multi=True)
|
option2 = StrOption('unicode2', "Values 'test' must show 'Unicode follower 2'", multi=True)
|
||||||
option3 = UnicodeOption('unicode3', "Unicode follower 2", multi=True,
|
hidden_property = Calculation(calc_value,
|
||||||
requires=[{'option': option2,
|
Params(ParamValue('hidden'),
|
||||||
'expected': u'test',
|
kwargs={'condition': ParamOption(option2, todict=True),
|
||||||
'action': 'hidden',
|
'expected': ParamValue('test'),
|
||||||
'inverse': True}])
|
'reverse_condition': ParamValue(True)}))
|
||||||
|
option3 = StrOption('unicode3', "Unicode follower 2", multi=True, properties=(hidden_property,))
|
||||||
descr1 = Leadership("unicode1", "Common configuration",
|
descr1 = Leadership("unicode1", "Common configuration",
|
||||||
[option1, option2, option3])
|
[option1, option2, option3])
|
||||||
descr = OptionDescription("options", "Common configuration", [descr1])
|
descr = OptionDescription("options", "Common configuration", [descr1])
|
||||||
|
@ -1,81 +0,0 @@
|
|||||||
{
|
|
||||||
"schema": {
|
|
||||||
"options": {
|
|
||||||
"properties": {
|
|
||||||
"options.unicode": {
|
|
||||||
"type": "string",
|
|
||||||
"title": "Value 'test' must show leader"
|
|
||||||
},
|
|
||||||
"options.unicode1": {
|
|
||||||
"properties": {
|
|
||||||
"options.unicode1.unicode1": {
|
|
||||||
"type": "string",
|
|
||||||
"isMulti": true,
|
|
||||||
"title": "Unicode leader"
|
|
||||||
},
|
|
||||||
"options.unicode1.unicode2": {
|
|
||||||
"type": "string",
|
|
||||||
"isMulti": true,
|
|
||||||
"title": "Unicode follower 1"
|
|
||||||
},
|
|
||||||
"options.unicode1.unicode3": {
|
|
||||||
"type": "string",
|
|
||||||
"isMulti": true,
|
|
||||||
"title": "Unicode follower 2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"type": "array",
|
|
||||||
"title": "Common configuration"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"type": "object",
|
|
||||||
"title": "Common configuration"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"model": {
|
|
||||||
"options.unicode1": {
|
|
||||||
"properties": [
|
|
||||||
"hidden"
|
|
||||||
],
|
|
||||||
"hidden": true
|
|
||||||
},
|
|
||||||
"options.unicode1.unicode1": {
|
|
||||||
"required": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"form": {
|
|
||||||
"options.unicode": {
|
|
||||||
"type": "input",
|
|
||||||
"dependencies": {
|
|
||||||
"default": {
|
|
||||||
"hide": [
|
|
||||||
"options.unicode1"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"expected": {
|
|
||||||
"test": {
|
|
||||||
"show": [
|
|
||||||
"options.unicode1"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options.unicode1.unicode1": {
|
|
||||||
"type": "input"
|
|
||||||
},
|
|
||||||
"options.unicode1.unicode2": {
|
|
||||||
"type": "input"
|
|
||||||
},
|
|
||||||
"options.unicode1.unicode3": {
|
|
||||||
"type": "input"
|
|
||||||
},
|
|
||||||
"null": [
|
|
||||||
{
|
|
||||||
"title": "Configurer",
|
|
||||||
"type": "submit"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"version": "1.0"
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
|
||||||
from tiramisu import Leadership
|
|
||||||
|
|
||||||
|
|
||||||
def get_description():
|
|
||||||
"""generate description for this test
|
|
||||||
"""
|
|
||||||
option = UnicodeOption('unicode', "Value 'test' must show leader")
|
|
||||||
option1 = UnicodeOption('unicode1', "Unicode leader", multi=True, requires=[{'option': option,
|
|
||||||
'expected': u'test',
|
|
||||||
'action': 'hidden',
|
|
||||||
'inverse': True}])
|
|
||||||
option2 = UnicodeOption('unicode2', "Unicode follower 1", multi=True)
|
|
||||||
option3 = UnicodeOption('unicode3', "Unicode follower 2", multi=True)
|
|
||||||
descr1 = Leadership("unicode1", "Common configuration",
|
|
||||||
[option1, option2, option3])
|
|
||||||
descr = OptionDescription("options", "Common configuration", [option, descr1])
|
|
||||||
descr = OptionDescription("unicode1_leadership_requires_leader", "Leader follower with requirement on leader", [descr])
|
|
||||||
return descr
|
|
@ -36,6 +36,9 @@
|
|||||||
"model": {
|
"model": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
"required": true,
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"test",
|
"test",
|
||||||
"val2"
|
"val2"
|
||||||
@ -65,13 +68,31 @@
|
|||||||
"options.unicode.unicode3": {
|
"options.unicode.unicode3": {
|
||||||
"1": {
|
"1": {
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
|
"display": false,
|
||||||
"value": "super",
|
"value": "super",
|
||||||
"owner": "user"
|
"owner": "user"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"default": {
|
"default": {
|
||||||
@ -89,12 +110,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"options.unicode.unicode1": {
|
"options.unicode.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode2": {
|
"options.unicode.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode3": {
|
"options.unicode.unicode3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu import StrOption, OptionDescription, Leadership, Calculation, ParamValue, ParamOption, Params, calc_value
|
||||||
from tiramisu import Leadership
|
|
||||||
|
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option = UnicodeOption('unicode', "Values 'test' must show 'Unicode follower 3'", multi=True)
|
option = StrOption('unicode', "Values 'test' must show 'Unicode follower 3'", multi=True)
|
||||||
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
|
option1 = StrOption('unicode1', "Unicode follower 1", multi=True)
|
||||||
option2 = UnicodeOption('unicode2', "Unicode follower 2", multi=True)
|
option2 = StrOption('unicode2', "Unicode follower 2", multi=True)
|
||||||
option3 = UnicodeOption('unicode3', "Unicode follower 3", requires=[{'option': option,
|
hidden_property = Calculation(calc_value,
|
||||||
'expected': u'test',
|
Params(ParamValue('hidden'),
|
||||||
'action': 'hidden',
|
kwargs={'condition': ParamOption(option, todict=True),
|
||||||
'inverse': True}],
|
'expected': ParamValue('test'),
|
||||||
multi=True)
|
'reverse_condition': ParamValue(True)}))
|
||||||
|
option3 = StrOption('unicode3', "Unicode follower 3", properties=(hidden_property,), multi=True)
|
||||||
descr1 = Leadership("unicode", "Common configuration 1",
|
descr1 = Leadership("unicode", "Common configuration 1",
|
||||||
[option, option1, option2, option3])
|
[option, option1, option2, option3])
|
||||||
descr = OptionDescription("options", "Common configuration 2", [descr1])
|
descr = OptionDescription("options", "Common configuration 2", [descr1])
|
||||||
@ -20,14 +20,14 @@ def get_description():
|
|||||||
return descr
|
return descr
|
||||||
|
|
||||||
|
|
||||||
def get_values(api, allpath=False):
|
async def get_values(api, allpath=False):
|
||||||
if allpath:
|
if allpath:
|
||||||
root = 'unicode1_leadership_requires_value.'
|
root = 'unicode1_leadership_requires_value.'
|
||||||
else:
|
else:
|
||||||
root = ''
|
root = ''
|
||||||
api.option(root + 'options.unicode.unicode').value.set([u'test', u'val2'])
|
await api.option(root + 'options.unicode.unicode').value.set([u'test', u'val2'])
|
||||||
api.option(root + 'options.unicode.unicode1', 0).value.set(u'super1')
|
await api.option(root + 'options.unicode.unicode1', 0).value.set(u'super1')
|
||||||
api.option(root + 'options.unicode.unicode1', 1).value.set(u'super2')
|
await api.option(root + 'options.unicode.unicode1', 1).value.set(u'super2')
|
||||||
api.option(root + 'options.unicode.unicode2', 0).value.set(u'pas test')
|
await api.option(root + 'options.unicode.unicode2', 0).value.set(u'pas test')
|
||||||
api.option(root + 'options.unicode.unicode2', 1).value.set(u'test')
|
await api.option(root + 'options.unicode.unicode2', 1).value.set(u'test')
|
||||||
api.option(root + 'options.unicode.unicode3', 1).value.set(u'super')
|
await api.option(root + 'options.unicode.unicode3', 1).value.set(u'super')
|
||||||
|
@ -36,20 +36,43 @@
|
|||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
"required": true
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode1": {
|
"options.unicode.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode2": {
|
"options.unicode.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode3": {
|
"options.unicode.unicode3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription, submulti
|
from tiramisu.option import StrOption, OptionDescription, submulti
|
||||||
from tiramisu import Leadership
|
from tiramisu import Leadership
|
||||||
|
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option = UnicodeOption('unicode', "Unicode leader", multi=True)
|
option = StrOption('unicode', "Unicode leader", multi=True)
|
||||||
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
|
option1 = StrOption('unicode1', "Unicode follower 1", multi=True)
|
||||||
option2 = UnicodeOption('unicode2', "Unicode follower 2 submulti", multi=submulti)
|
option2 = StrOption('unicode2', "Unicode follower 2 submulti", multi=submulti)
|
||||||
option3 = UnicodeOption('unicode3', "Unicode follower 3", multi=True)
|
option3 = StrOption('unicode3', "Unicode follower 3", multi=True)
|
||||||
descr1 = Leadership("unicode", "Common configuration 1",
|
descr1 = Leadership("unicode", "Common configuration 1",
|
||||||
[option, option1, option2, option3])
|
[option, option1, option2, option3])
|
||||||
descr = OptionDescription("options", "Common configuration 2", [descr1])
|
descr = OptionDescription("options", "Common configuration 2", [descr1])
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
"isMulti": true,
|
||||||
"value": [
|
"value": [
|
||||||
"val1",
|
"val1",
|
||||||
"val2"
|
"val2"
|
||||||
],
|
],
|
||||||
"isMulti": true,
|
|
||||||
"title": "Unicode leader"
|
"title": "Unicode leader"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode1": {
|
"options.unicode.unicode1": {
|
||||||
@ -20,7 +20,7 @@
|
|||||||
},
|
},
|
||||||
"options.unicode.unicode2": {
|
"options.unicode.unicode2": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "follower2",
|
"defaultmulti": "follower2",
|
||||||
"isMulti": true,
|
"isMulti": true,
|
||||||
"title": "Unicode follower 2 with default multi"
|
"title": "Unicode follower 2 with default multi"
|
||||||
},
|
},
|
||||||
@ -41,6 +41,9 @@
|
|||||||
"model": {
|
"model": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
"required": true,
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"val3",
|
"val3",
|
||||||
"val4"
|
"val4"
|
||||||
@ -74,12 +77,29 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode.unicode": {
|
"options.unicode.unicode": {
|
||||||
"clearable": true,
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode1": {
|
"options.unicode.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode2": {
|
"options.unicode.unicode2": {
|
||||||
@ -87,6 +107,7 @@
|
|||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode.unicode3": {
|
"options.unicode.unicode3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu.option import StrOption, OptionDescription
|
||||||
from tiramisu import Leadership
|
from tiramisu import Leadership
|
||||||
|
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option = UnicodeOption('unicode', "Unicode leader", ['val1', 'val2'], multi=True)
|
option = StrOption('unicode', "Unicode leader", ['val1', 'val2'], multi=True)
|
||||||
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
|
option1 = StrOption('unicode1', "Unicode follower 1", multi=True)
|
||||||
option2 = UnicodeOption('unicode2', "Unicode follower 2 with default multi", default_multi="follower2", multi=True)
|
option2 = StrOption('unicode2', "Unicode follower 2 with default multi", default_multi="follower2", multi=True)
|
||||||
option3 = UnicodeOption('unicode3', "Unicode follower 3", multi=True)
|
option3 = StrOption('unicode3', "Unicode follower 3", multi=True)
|
||||||
descr1 = Leadership("unicode", "Common configuration 1",
|
descr1 = Leadership("unicode", "Common configuration 1",
|
||||||
[option, option1, option2, option3])
|
[option, option1, option2, option3])
|
||||||
descr = OptionDescription("options", "Common configuration 2", [descr1])
|
descr = OptionDescription("options", "Common configuration 2", [descr1])
|
||||||
@ -16,14 +16,14 @@ def get_description():
|
|||||||
return descr
|
return descr
|
||||||
|
|
||||||
|
|
||||||
def get_values(api, allpath=False):
|
async def get_values(api, allpath=False):
|
||||||
if allpath:
|
if allpath:
|
||||||
root = 'unicode1_leadership_value.'
|
root = 'unicode1_leadership_value.'
|
||||||
else:
|
else:
|
||||||
root = ''
|
root = ''
|
||||||
api.option(root + 'options.unicode.unicode').value.set([u'val3', u'val4'])
|
await api.option(root + 'options.unicode.unicode').value.set([u'val3', u'val4'])
|
||||||
api.option(root + 'options.unicode.unicode1', 0).value.set(u'super1')
|
await api.option(root + 'options.unicode.unicode1', 0).value.set(u'super1')
|
||||||
api.option(root + 'options.unicode.unicode1', 1).value.set(u'super2')
|
await api.option(root + 'options.unicode.unicode1', 1).value.set(u'super2')
|
||||||
api.option(root + 'options.unicode.unicode2', 0).value.set(u'pas test')
|
await api.option(root + 'options.unicode.unicode2', 0).value.set(u'pas test')
|
||||||
api.option(root + 'options.unicode.unicode2', 1).value.set(u'test')
|
await api.option(root + 'options.unicode.unicode2', 1).value.set(u'test')
|
||||||
api.option(root + 'options.unicode.unicode3', 1).value.set(u'super')
|
await api.option(root + 'options.unicode.unicode3', 1).value.set(u'super')
|
||||||
|
@ -1,11 +1,28 @@
|
|||||||
{"updates": ["options.unicode.unicode",
|
{
|
||||||
"options.unicode.unicode1",
|
"updates": [
|
||||||
"options.unicode.unicode2",
|
"options.unicode.unicode",
|
||||||
"options.unicode.unicode3"],
|
"options.unicode.unicode1",
|
||||||
"model": {"options.unicode.unicode": {"owner": "default",
|
"options.unicode.unicode2",
|
||||||
"required": true,
|
"options.unicode.unicode3"
|
||||||
"value": ["val1", "val2"]},
|
],
|
||||||
"options.unicode.unicode2": {"0": {"owner": "default",
|
"model": {
|
||||||
"value": "follower2"},
|
"options.unicode.unicode": {
|
||||||
"1": {"owner": "default",
|
"required": true,
|
||||||
"value": "follower2"}}}}
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
|
"value": [
|
||||||
|
"val1",
|
||||||
|
"val2"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"options.unicode.unicode2": {
|
||||||
|
"0": {
|
||||||
|
"value": "follower2"
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
"value": "follower2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,11 +1,32 @@
|
|||||||
{"updates": ["options.unicode.unicode",
|
{
|
||||||
"options.unicode.unicode1",
|
"updates": [
|
||||||
"options.unicode.unicode2",
|
"options.unicode.unicode",
|
||||||
"options.unicode.unicode3"],
|
"options.unicode.unicode1",
|
||||||
"model": {"options.unicode.unicode": {"required": true,
|
"options.unicode.unicode2",
|
||||||
"value": ["val3"],
|
"options.unicode.unicode3"
|
||||||
"owner": "user"},
|
],
|
||||||
"options.unicode.unicode1": {"0": {"value": "super1",
|
"model": {
|
||||||
"owner": "user"}},
|
"options.unicode.unicode": {
|
||||||
"options.unicode.unicode2": {"0": {"value": "pas test",
|
"required": true,
|
||||||
"owner": "user"}}}}
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
|
"value": [
|
||||||
|
"val3"
|
||||||
|
],
|
||||||
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"options.unicode.unicode1": {
|
||||||
|
"0": {
|
||||||
|
"value": "super1",
|
||||||
|
"owner": "user"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"options.unicode.unicode2": {
|
||||||
|
"0": {
|
||||||
|
"value": "pas test",
|
||||||
|
"owner": "user"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,17 +1,49 @@
|
|||||||
{"updates": ["options.unicode.unicode",
|
{
|
||||||
"options.unicode.unicode2"],
|
"updates": [
|
||||||
"model": {"options.unicode.unicode": {"required": true,
|
"options.unicode.unicode",
|
||||||
"value": ["val3", "val4", "val5"],
|
"options.unicode.unicode2"
|
||||||
"owner": "user"},
|
],
|
||||||
"options.unicode.unicode1": {"0": {"value": "super1",
|
"model": {
|
||||||
"owner": "user"},
|
"options.unicode.unicode": {
|
||||||
"1": {"value": "super2",
|
"required": true,
|
||||||
"owner": "user"}},
|
"properties": [
|
||||||
"options.unicode.unicode2": {"0": {"value": "pas test",
|
"unique"
|
||||||
"owner": "user"},
|
],
|
||||||
"1": {"value": "test",
|
"value": [
|
||||||
"owner": "user"},
|
"val3",
|
||||||
"2": {"value": "follower2",
|
"val4",
|
||||||
"owner": "default"}},
|
"val5"
|
||||||
"options.unicode.unicode3": {"1": {"value": "super",
|
],
|
||||||
"owner": "user"}}}}
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"options.unicode.unicode1": {
|
||||||
|
"0": {
|
||||||
|
"value": "super1",
|
||||||
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
"value": "super2",
|
||||||
|
"owner": "user"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"options.unicode.unicode2": {
|
||||||
|
"0": {
|
||||||
|
"value": "pas test",
|
||||||
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
"value": "test",
|
||||||
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"2": {
|
||||||
|
"value": "follower2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"options.unicode.unicode3": {
|
||||||
|
"1": {
|
||||||
|
"value": "super",
|
||||||
|
"owner": "user"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,16 +1,49 @@
|
|||||||
{"model": {"options.unicode.unicode": {"owner": "user",
|
{
|
||||||
"required": true,
|
"updates": [
|
||||||
"value": ["val3", "val4", "val5"]},
|
"options.unicode.unicode",
|
||||||
"options.unicode.unicode1": {"0": {"owner": "user",
|
"options.unicode.unicode2"
|
||||||
"value": "super1"},
|
],
|
||||||
"1": {"owner": "user",
|
"model": {
|
||||||
"value": "super2"}},
|
"options.unicode.unicode": {
|
||||||
"options.unicode.unicode2": {"0": {"owner": "user",
|
"required": true,
|
||||||
"value": "pas test"},
|
"properties": [
|
||||||
"1": {"owner": "user",
|
"unique"
|
||||||
"value": "test"},
|
],
|
||||||
"2": {"owner": "default",
|
"value": [
|
||||||
"value": "follower2"}},
|
"val3",
|
||||||
"options.unicode.unicode3": {"1": {"owner": "user",
|
"val4",
|
||||||
"value": "super"}}},
|
"val5"
|
||||||
"updates": ["options.unicode.unicode", "options.unicode.unicode2"]}
|
],
|
||||||
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"options.unicode.unicode1": {
|
||||||
|
"0": {
|
||||||
|
"value": "super1",
|
||||||
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
"value": "super2",
|
||||||
|
"owner": "user"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"options.unicode.unicode2": {
|
||||||
|
"0": {
|
||||||
|
"value": "pas test",
|
||||||
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
"value": "test",
|
||||||
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"2": {
|
||||||
|
"value": "follower2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"options.unicode.unicode3": {
|
||||||
|
"1": {
|
||||||
|
"value": "super",
|
||||||
|
"owner": "user"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,14 +1,43 @@
|
|||||||
{"updates": ["options.unicode.unicode2"],
|
{
|
||||||
"model": {"options.unicode.unicode": {"required": true,
|
"updates": [
|
||||||
"value": ["val3", "val4"],
|
"options.unicode.unicode2"
|
||||||
"owner": "user"},
|
],
|
||||||
"options.unicode.unicode1": {"0": {"value": "super1",
|
"model": {
|
||||||
"owner": "user"},
|
"options.unicode.unicode": {
|
||||||
"1": {"value": "super2",
|
"required": true,
|
||||||
"owner": "user"}},
|
"properties": [
|
||||||
"options.unicode.unicode2": {"0": {"value": "pas test",
|
"unique"
|
||||||
"owner": "user"},
|
],
|
||||||
"1": {"value": "follower2",
|
"value": [
|
||||||
"owner": "default"}},
|
"val3",
|
||||||
"options.unicode.unicode3": {"1": {"value": "super",
|
"val4"
|
||||||
"owner": "user"}}}}
|
],
|
||||||
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"options.unicode.unicode1": {
|
||||||
|
"0": {
|
||||||
|
"value": "super1",
|
||||||
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
"value": "super2",
|
||||||
|
"owner": "user"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"options.unicode.unicode2": {
|
||||||
|
"0": {
|
||||||
|
"value": "pas test",
|
||||||
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
"value": "follower2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"options.unicode.unicode3": {
|
||||||
|
"1": {
|
||||||
|
"value": "super",
|
||||||
|
"owner": "user"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,14 +1,44 @@
|
|||||||
{"updates": ["options.unicode.unicode2"],
|
{
|
||||||
"model": {"options.unicode.unicode": {"required": true,
|
"updates": [
|
||||||
"value": ["val3", "val4"],
|
"options.unicode.unicode2"
|
||||||
"owner": "user"},
|
],
|
||||||
"options.unicode.unicode1": {"0": {"value": "super1",
|
"model": {
|
||||||
"owner": "user"},
|
"options.unicode.unicode": {
|
||||||
"1": {"value": "super2",
|
"required": true,
|
||||||
"owner": "user"}},
|
"properties": [
|
||||||
"options.unicode.unicode2": {"0": {"value": "pas test",
|
"unique"
|
||||||
"owner": "user"},
|
],
|
||||||
"1": {"value": "test2",
|
"value": [
|
||||||
"owner": "user"}},
|
"val3",
|
||||||
"options.unicode.unicode3": {"1": {"value": "super",
|
"val4"
|
||||||
"owner": "user"}}}}
|
],
|
||||||
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"options.unicode.unicode1": {
|
||||||
|
"0": {
|
||||||
|
"value": "super1",
|
||||||
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
"value": "super2",
|
||||||
|
"owner": "user"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"options.unicode.unicode2": {
|
||||||
|
"0": {
|
||||||
|
"value": "pas test",
|
||||||
|
"owner": "user"
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
"value": "test2",
|
||||||
|
"owner": "user"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"options.unicode.unicode3": {
|
||||||
|
"1": {
|
||||||
|
"value": "super",
|
||||||
|
"owner": "user"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -16,8 +16,25 @@
|
|||||||
"required": true
|
"required": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""just a multi unicode option
|
"""just a multi unicode option
|
||||||
"""
|
"""
|
||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu.option import StrOption, OptionDescription
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option = UnicodeOption('unicode', "Unicode 1", properties=('mandatory',))
|
option = StrOption('unicode', "Unicode 1", properties=('mandatory',))
|
||||||
descr1 = OptionDescription("options", "Common configuration", [option])
|
descr1 = OptionDescription("options", "Common configuration", [option])
|
||||||
descr = OptionDescription("unicode1_mandatory", "Mandatory unicode", [descr1])
|
descr = OptionDescription("unicode1_mandatory", "Mandatory unicode", [descr1])
|
||||||
return descr
|
return descr
|
||||||
|
@ -17,8 +17,25 @@
|
|||||||
"owner": "user"
|
"owner": "user"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -11,9 +11,9 @@ def get_description():
|
|||||||
return descr
|
return descr
|
||||||
|
|
||||||
|
|
||||||
def get_values(api, allpath=False):
|
async def get_values(api, allpath=False):
|
||||||
if allpath:
|
if allpath:
|
||||||
root = 'unicode1_mod_value.'
|
root = 'unicode1_mod_value.'
|
||||||
else:
|
else:
|
||||||
root = ''
|
root = ''
|
||||||
api.option(root + 'options.unicode').value.set('a')
|
await api.option(root + 'options.unicode').value.set('a')
|
||||||
|
@ -14,11 +14,31 @@
|
|||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
"required": true
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""just a multi unicode option
|
"""just a multi unicode option
|
||||||
"""
|
"""
|
||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu.option import StrOption, OptionDescription
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option = UnicodeOption('unicode', "Multi string 1", multi=True)
|
option = StrOption('unicode', "Multi string 1", multi=True)
|
||||||
descr1 = OptionDescription("options", "Common configuration", [option])
|
descr1 = OptionDescription("options", "Common configuration", [option])
|
||||||
descr = OptionDescription("unicode1_multi", "Multi unicode", [descr1])
|
descr = OptionDescription("unicode1_multi", "Multi unicode", [descr1])
|
||||||
return descr
|
return descr
|
||||||
|
@ -1,4 +1,17 @@
|
|||||||
{"updates": ["options.unicode"],
|
{
|
||||||
"model": {"options.unicode": {"owner": "user",
|
"updates": [
|
||||||
"required": true,
|
"options.unicode"
|
||||||
"value": ["val"]}}}
|
],
|
||||||
|
"model": {
|
||||||
|
"options.unicode": {
|
||||||
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
|
"value": [
|
||||||
|
"val"
|
||||||
|
],
|
||||||
|
"owner": "user"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -14,13 +14,33 @@
|
|||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
"display": false,
|
|
||||||
"required": true,
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
|
"display": false,
|
||||||
"hidden": true
|
"hidden": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""just a multi unicode option
|
"""just a multi unicode option
|
||||||
"""
|
"""
|
||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu.option import StrOption, OptionDescription
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option = UnicodeOption('unicode', "Unicode 1", properties=('hidden',), multi=True)
|
option = StrOption('unicode', "Unicode 1", properties=('hidden',), multi=True)
|
||||||
descr1 = OptionDescription("options", "Common configuration", [option])
|
descr1 = OptionDescription("options", "Common configuration", [option])
|
||||||
descr = OptionDescription("unicode1_multi_hidden", "Hidden multi unicode", [descr1])
|
descr = OptionDescription("unicode1_multi_hidden", "Hidden multi unicode", [descr1])
|
||||||
return descr
|
return descr
|
||||||
|
@ -15,11 +15,31 @@
|
|||||||
"model": {
|
"model": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
"required": true,
|
"required": true,
|
||||||
"needs_len": true
|
"needs_len": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""just a multi unicode option
|
"""just a multi unicode option
|
||||||
"""
|
"""
|
||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu.option import StrOption, OptionDescription
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option = UnicodeOption('unicode', "Unicode 1", multi=True, properties=('mandatory',))
|
option = StrOption('unicode', "Unicode 1", multi=True, properties=('mandatory',))
|
||||||
descr1 = OptionDescription("options", "Common configuration", [option])
|
descr1 = OptionDescription("options", "Common configuration", [option])
|
||||||
descr = OptionDescription("unicode1_multi_mandatory", "Mandatory multi Unicode", [descr1])
|
descr = OptionDescription("unicode1_multi_mandatory", "Mandatory multi Unicode", [descr1])
|
||||||
return descr
|
return descr
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
"isMulti": true,
|
||||||
"value": [
|
"value": [
|
||||||
"a",
|
"a",
|
||||||
"b"
|
"b"
|
||||||
],
|
],
|
||||||
"isMulti": true,
|
|
||||||
"title": "String 1"
|
"title": "String 1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -19,6 +19,9 @@
|
|||||||
"model": {
|
"model": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
"required": true,
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"c",
|
"c",
|
||||||
"d",
|
"d",
|
||||||
@ -27,6 +30,22 @@
|
|||||||
"owner": "user"
|
"owner": "user"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
"clearable": true,
|
"clearable": true,
|
||||||
|
@ -11,9 +11,9 @@ def get_description():
|
|||||||
return descr
|
return descr
|
||||||
|
|
||||||
|
|
||||||
def get_values(api, allpath=False):
|
async def get_values(api, allpath=False):
|
||||||
if allpath:
|
if allpath:
|
||||||
root = 'unicode1_multi_mod_value.'
|
root = 'unicode1_multi_mod_value.'
|
||||||
else:
|
else:
|
||||||
root = ''
|
root = ''
|
||||||
api.option(root + 'options.unicode').value.set(['c', 'd', 'e'])
|
await api.option(root + 'options.unicode').value.set(['c', 'd', 'e'])
|
||||||
|
@ -1,4 +1,17 @@
|
|||||||
{"updates": ["options.unicode"],
|
{
|
||||||
"model": {"options.unicode": {"owner": "default",
|
"updates": [
|
||||||
"required": true,
|
"options.unicode"
|
||||||
"value": ["a", "b"]}}}
|
],
|
||||||
|
"model": {
|
||||||
|
"options.unicode": {
|
||||||
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
|
"value": [
|
||||||
|
"a",
|
||||||
|
"b"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,19 @@
|
|||||||
{"updates": ["options.unicode"],
|
{
|
||||||
"model": {"options.unicode": {"owner": "user",
|
"updates": [
|
||||||
"required": true,
|
"options.unicode"
|
||||||
"value": ["c", "f", "e"]}}}
|
],
|
||||||
|
"model": {
|
||||||
|
"options.unicode": {
|
||||||
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
|
"value": [
|
||||||
|
"c",
|
||||||
|
"f",
|
||||||
|
"e"
|
||||||
|
],
|
||||||
|
"owner": "user"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -24,11 +24,11 @@
|
|||||||
},
|
},
|
||||||
"descr2.unicode2_multi": {
|
"descr2.unicode2_multi": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
"isMulti": true,
|
||||||
"value": [
|
"value": [
|
||||||
"a",
|
"a",
|
||||||
"b"
|
"b"
|
||||||
],
|
],
|
||||||
"isMulti": true,
|
|
||||||
"title": "Multi unicode 2"
|
"title": "Multi unicode 2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -56,77 +56,107 @@
|
|||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
"descr2.unicode2": {
|
"descr2.unicode2": {
|
||||||
"value": "a",
|
"value": "a"
|
||||||
"owner": "default"
|
|
||||||
},
|
},
|
||||||
"descr2.unicode2_multi": {
|
"descr2.unicode2_multi": {
|
||||||
"required": true,
|
"required": true,
|
||||||
"value": [
|
"value": [
|
||||||
"a",
|
"a",
|
||||||
"b"
|
"b"
|
||||||
],
|
]
|
||||||
"owner": "default"
|
|
||||||
},
|
},
|
||||||
"descr3.unicode3_multi": {
|
"descr3.unicode3_multi": {
|
||||||
"required": true
|
"required": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"descr1.unicode1": {
|
"descr1.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"not_equal": {
|
"not_equal": [
|
||||||
"options": [
|
{
|
||||||
"descr2.unicode2",
|
"options": [
|
||||||
"descr3.unicode3"
|
"descr2.unicode2",
|
||||||
]
|
"descr3.unicode3"
|
||||||
}
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"descr1.unicode1_multi": {
|
"descr1.unicode1_multi": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"not_equal": {
|
"not_equal": [
|
||||||
"options": [
|
{
|
||||||
"descr2.unicode2_multi",
|
"options": [
|
||||||
"descr3.unicode3_multi"
|
"descr2.unicode2_multi",
|
||||||
]
|
"descr3.unicode3_multi"
|
||||||
}
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"descr2.unicode2": {
|
"descr2.unicode2": {
|
||||||
"clearable": true,
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"not_equal": {
|
"not_equal": [
|
||||||
"options": [
|
{
|
||||||
"descr1.unicode1",
|
"options": [
|
||||||
"descr3.unicode3"
|
"descr1.unicode1",
|
||||||
]
|
"descr3.unicode3"
|
||||||
}
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"descr2.unicode2_multi": {
|
"descr2.unicode2_multi": {
|
||||||
"clearable": true,
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"not_equal": {
|
"not_equal": [
|
||||||
"options": [
|
{
|
||||||
"descr1.unicode1_multi",
|
"options": [
|
||||||
"descr3.unicode3_multi"
|
"descr1.unicode1_multi",
|
||||||
]
|
"descr3.unicode3_multi"
|
||||||
}
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"descr3.unicode3": {
|
"descr3.unicode3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"not_equal": {
|
"not_equal": [
|
||||||
"options": [
|
{
|
||||||
"descr1.unicode1",
|
"options": [
|
||||||
"descr2.unicode2"
|
"descr1.unicode1",
|
||||||
]
|
"descr2.unicode2"
|
||||||
}
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"descr3.unicode3_multi": {
|
"descr3.unicode3_multi": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"not_equal": {
|
"not_equal": [
|
||||||
"options": [
|
{
|
||||||
"descr1.unicode1_multi",
|
"options": [
|
||||||
"descr2.unicode2_multi"
|
"descr1.unicode1_multi",
|
||||||
]
|
"descr2.unicode2_multi"
|
||||||
}
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
{
|
{
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu.option import StrOption, OptionDescription
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option1 = UnicodeOption('unicode1', "Unicode 1, not equal to 'a'")
|
option1 = StrOption('unicode1', "Unicode 1, not equal to 'a'")
|
||||||
option2 = UnicodeOption('unicode1_multi', "Multi unicode 1, not equal to 'a' or 'b'", multi=True)
|
option2 = StrOption('unicode1_multi', "Multi unicode 1, not equal to 'a' or 'b'", multi=True)
|
||||||
option3 = UnicodeOption('unicode2', "Unicode 2", default='a')
|
option3 = StrOption('unicode2', "Unicode 2", default='a')
|
||||||
option4 = UnicodeOption('unicode2_multi', "Multi unicode 2", multi=True, default=['a', 'b'])
|
option4 = StrOption('unicode2_multi', "Multi unicode 2", multi=True, default=['a', 'b'])
|
||||||
option5 = UnicodeOption('unicode3', "Unicode 3")
|
option5 = StrOption('unicode3', "Unicode 3")
|
||||||
option6 = UnicodeOption('unicode3_multi', "Multi unicode 3", multi=True)
|
option6 = StrOption('unicode3_multi', "Multi unicode 3", multi=True)
|
||||||
#option1.impl_add_consistency('not_equal', option3, option5)
|
#option1.impl_add_consistency('not_equal', option3, option5)
|
||||||
#option2.impl_add_consistency('not_equal', option4, option6)
|
#option2.impl_add_consistency('not_equal', option4, option6)
|
||||||
option3.impl_add_consistency('not_equal', option1)
|
option3.impl_add_consistency('not_equal', option1)
|
||||||
|
@ -19,11 +19,32 @@
|
|||||||
"model": {
|
"model": {
|
||||||
"options.unicode2": {
|
"options.unicode2": {
|
||||||
"required": true,
|
"required": true,
|
||||||
"hidden": true
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
|
"hidden": true,
|
||||||
|
"display": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode1": {
|
"options.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"default": {
|
"default": {
|
||||||
@ -41,6 +62,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"options.unicode2": {
|
"options.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
from tiramisu.option import StrOption, OptionDescription
|
from tiramisu import StrOption, OptionDescription, Calculation, ParamValue, ParamOption, Params, calc_value
|
||||||
|
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option1 = StrOption('unicode1', "Value 'test' must show Unicode 2")
|
option1 = StrOption('unicode1', "Value 'test' must show Unicode 2")
|
||||||
option2 = StrOption('unicode2', "Unicode 2", requires=[{'option': option1,
|
hidden_property = Calculation(calc_value,
|
||||||
'expected': u'test',
|
Params(ParamValue('hidden'),
|
||||||
'action': 'hidden',
|
kwargs={'condition': ParamOption(option1, todict=True),
|
||||||
'inverse': True}],
|
'expected': ParamValue('test'),
|
||||||
multi=True)
|
'reverse_condition': ParamValue(True)}))
|
||||||
|
option2 = StrOption('unicode2', "Unicode 2", properties=(hidden_property,), multi=True)
|
||||||
descr1 = OptionDescription("options", "Common configuration", [option1, option2])
|
descr1 = OptionDescription("options", "Common configuration", [option1, option2])
|
||||||
descr = OptionDescription("unicode1_multi_requires", "Unicode multi with requirement", [descr1])
|
descr = OptionDescription("unicode1_multi_requires", "Unicode multi with requirement", [descr1])
|
||||||
return descr
|
return descr
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
"isMulti": true,
|
||||||
"value": [
|
"value": [
|
||||||
"a",
|
"a",
|
||||||
"b"
|
"b"
|
||||||
],
|
],
|
||||||
"isMulti": true,
|
|
||||||
"title": "String 1"
|
"title": "String 1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -19,13 +19,31 @@
|
|||||||
"model": {
|
"model": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
"required": true,
|
"required": true,
|
||||||
|
"properties": [
|
||||||
|
"unique"
|
||||||
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"a",
|
"a",
|
||||||
"b"
|
"b"
|
||||||
],
|
]
|
||||||
"owner": "default"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode": {
|
"options.unicode": {
|
||||||
"clearable": true,
|
"clearable": true,
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
"""just a multi unicode option
|
"""just a multi unicode option
|
||||||
"""
|
"""
|
||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu.option import StrOption, OptionDescription
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option = UnicodeOption('unicode', "String 1", ['a', 'b'], multi=True)
|
option = StrOption('unicode', "String 1", ['a', 'b'], multi=True)
|
||||||
descr1 = OptionDescription("options", "Common configuration", [option])
|
descr1 = OptionDescription("options", "Common configuration", [option])
|
||||||
descr = OptionDescription("unicode1_multi_value", "Multi unicode with default value 'a' and 'b'", [descr1])
|
descr = OptionDescription("unicode1_multi_value", "Multi unicode with default value 'a' and 'b'", [descr1])
|
||||||
return descr
|
return descr
|
||||||
|
@ -16,22 +16,44 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"model": {},
|
"model": {},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode1": {
|
"options.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"not_equal": {
|
"not_equal": [
|
||||||
"options": [
|
{
|
||||||
"options.unicode2"
|
"options": [
|
||||||
]
|
"options.unicode2"
|
||||||
}
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"options.unicode2": {
|
"options.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"not_equal": {
|
"not_equal": [
|
||||||
"options": [
|
{
|
||||||
"options.unicode1"
|
"options": [
|
||||||
]
|
"options.unicode1"
|
||||||
}
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu.option import StrOption, OptionDescription
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option1 = UnicodeOption('unicode1', "Unicode 1")
|
option1 = StrOption('unicode1', "Unicode 1")
|
||||||
option2 = UnicodeOption('unicode2', "Unicode 2")
|
option2 = StrOption('unicode2', "Unicode 2")
|
||||||
option2.impl_add_consistency('not_equal', option1)
|
option2.impl_add_consistency('not_equal', option1)
|
||||||
descr1 = OptionDescription("options", "Common configuration", [option1, option2])
|
descr1 = OptionDescription("options", "Common configuration", [option1, option2])
|
||||||
descr = OptionDescription("unicode1_not_equal", "Unicode 1 and unicode 2 not equal", [descr1])
|
descr = OptionDescription("unicode1_not_equal", "Unicode 1 and unicode 2 not equal", [descr1])
|
||||||
|
@ -29,12 +29,36 @@
|
|||||||
"unicode1": {
|
"unicode1": {
|
||||||
"properties": [
|
"properties": [
|
||||||
"hidden"
|
"hidden"
|
||||||
],
|
]
|
||||||
"hidden": true
|
},
|
||||||
|
"unicode1.unicode2": {
|
||||||
|
"hidden": true,
|
||||||
|
"display": false
|
||||||
|
},
|
||||||
|
"unicode1.unicode3": {
|
||||||
|
"hidden": true,
|
||||||
|
"display": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode1": {
|
"options.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"default": {
|
"default": {
|
||||||
@ -52,9 +76,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"unicode1.unicode2": {
|
"unicode1.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"unicode1.unicode3": {
|
"unicode1.unicode3": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
from tiramisu.option import UnicodeOption, OptionDescription
|
from tiramisu import StrOption, OptionDescription, Calculation, ParamValue, ParamOption, Params, calc_value
|
||||||
|
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option1 = UnicodeOption('unicode1', "Value 'test' must show OptionDescription")
|
option1 = StrOption('unicode1', "Value 'test' must show OptionDescription")
|
||||||
descr1 = OptionDescription("options", "Common configuration", [option1])
|
descr1 = OptionDescription("options", "Common configuration", [option1])
|
||||||
option2 = UnicodeOption('unicode2', "Unicode 2")
|
option2 = StrOption('unicode2', "Unicode 2")
|
||||||
option3 = UnicodeOption('unicode3', "Unicode 3")
|
option3 = StrOption('unicode3', "Unicode 3")
|
||||||
descr2 = OptionDescription("unicode1", "OptionDescription with 2 options",
|
hidden_property = Calculation(calc_value,
|
||||||
[option2, option3], requires=[{'option': option1,
|
Params(ParamValue('hidden'),
|
||||||
'expected': u'test',
|
kwargs={'condition': ParamOption(option1, todict=True),
|
||||||
'action': 'hidden',
|
'expected': ParamValue('test'),
|
||||||
'inverse': True}])
|
'reverse_condition': ParamValue(True)}))
|
||||||
|
descr2 = OptionDescription("unicode1", "OptionDescription with 2 options", [option2, option3], properties=(hidden_property,))
|
||||||
descr = OptionDescription("unicode1_optiondescription_requires", "OptionDesciption with requirement", [descr1, descr2])
|
descr = OptionDescription("unicode1_optiondescription_requires", "OptionDesciption with requirement", [descr1, descr2])
|
||||||
return descr
|
return descr
|
||||||
|
@ -17,11 +17,29 @@
|
|||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
"options.unicode2": {
|
"options.unicode2": {
|
||||||
|
"display": false,
|
||||||
"hidden": true
|
"hidden": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode1": {
|
"options.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"default": {
|
"default": {
|
||||||
@ -39,6 +57,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"options.unicode2": {
|
"options.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
from tiramisu.option import StrOption, OptionDescription
|
from tiramisu import StrOption, OptionDescription, Calculation, ParamValue, ParamOption, Params, calc_value
|
||||||
|
|
||||||
|
|
||||||
def get_description():
|
def get_description():
|
||||||
"""generate description for this test
|
"""generate description for this test
|
||||||
"""
|
"""
|
||||||
option1 = StrOption('unicode1', "Value 'test' must show Unicode 2")
|
option1 = StrOption('unicode1', "Value 'test' must show Unicode 2")
|
||||||
option2 = StrOption('unicode2', "Unicode 2", requires=[{'option': option1,
|
hidden_property = Calculation(calc_value,
|
||||||
'expected': u'test',
|
Params(ParamValue('hidden'),
|
||||||
'action': 'hidden',
|
kwargs={'condition': ParamOption(option1, todict=True),
|
||||||
'inverse': True}])
|
'expected': ParamValue('test'),
|
||||||
|
'reverse_condition': ParamValue(True)}))
|
||||||
|
option2 = StrOption('unicode2', "Unicode 2", properties=(hidden_property,))
|
||||||
descr1 = OptionDescription("options", "Common configuration", [option1, option2])
|
descr1 = OptionDescription("options", "Common configuration", [option1, option2])
|
||||||
descr = OptionDescription("unicode1_requires", "Unicode with requirement", [descr1])
|
descr = OptionDescription("unicode1_requires", "Unicode with requirement", [descr1])
|
||||||
return descr
|
return descr
|
||||||
|
@ -14,14 +14,29 @@
|
|||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
"options.unicode1": {
|
"options.unicode1": {
|
||||||
"value": "word",
|
"value": "word"
|
||||||
"owner": "default"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode1": {
|
"options.unicode1": {
|
||||||
"type": "input",
|
"clearable": true,
|
||||||
"clearable": true
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
{
|
{
|
||||||
|
@ -16,11 +16,29 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"model": {},
|
"model": {},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode1": {
|
"options.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"options.unicode2": {
|
"options.unicode2": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input"
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
|
@ -16,16 +16,33 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"model": {},
|
"model": {},
|
||||||
|
"global": {
|
||||||
|
"owner": "user",
|
||||||
|
"properties": [
|
||||||
|
"cache",
|
||||||
|
"demoting_error_warning",
|
||||||
|
"disabled",
|
||||||
|
"force_store_value",
|
||||||
|
"frozen",
|
||||||
|
"hidden",
|
||||||
|
"validator",
|
||||||
|
"warnings"
|
||||||
|
],
|
||||||
|
"permissives": [
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"options.unicode1": {
|
"options.unicode1": {
|
||||||
|
"clearable": true,
|
||||||
"type": "input",
|
"type": "input",
|
||||||
"copy": [
|
"copy": [
|
||||||
"options.unicode2"
|
"options.unicode2"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"options.unicode2": {
|
"options.unicode2": {
|
||||||
"type": "input",
|
"clearable": true,
|
||||||
"clearable": true
|
"type": "input"
|
||||||
},
|
},
|
||||||
"null": [
|
"null": [
|
||||||
{
|
{
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user