better symlink support for option.dict()
This commit is contained in:
4
tests/dict/data/unicode2_symlink.dict
Normal file
4
tests/dict/data/unicode2_symlink.dict
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"options.unicode1": "test",
|
||||
"options.unicode2": "test"
|
||||
}
|
4
tests/dict/data/unicode2_symlink.dict1
Normal file
4
tests/dict/data/unicode2_symlink.dict1
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"options.unicode1": "val",
|
||||
"options.unicode2": "val"
|
||||
}
|
42
tests/dict/data/unicode2_symlink.json
Normal file
42
tests/dict/data/unicode2_symlink.json
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"schema": {
|
||||
"options": {
|
||||
"name": "options",
|
||||
"properties": {
|
||||
"options.unicode1": {
|
||||
"name": "options.unicode1",
|
||||
"type": "string",
|
||||
"value": "test",
|
||||
"title": "Unicode 1"
|
||||
},
|
||||
"options.unicode2": {
|
||||
"name": "options.unicode2",
|
||||
"type": "symlink",
|
||||
"opt_path": "options.unicode1",
|
||||
"title": "Unicode 1"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"title": "Common configuration"
|
||||
}
|
||||
},
|
||||
"model": {
|
||||
"options.unicode1": {
|
||||
"value": "test",
|
||||
"owner": "default"
|
||||
}
|
||||
},
|
||||
"form": {
|
||||
"options.unicode1": {
|
||||
"clearable": true,
|
||||
"type": "input"
|
||||
},
|
||||
"null": [
|
||||
{
|
||||
"title": "Configurer",
|
||||
"type": "submit"
|
||||
}
|
||||
]
|
||||
},
|
||||
"version": "1.0"
|
||||
}
|
4
tests/dict/data/unicode2_symlink.mod1
Normal file
4
tests/dict/data/unicode2_symlink.mod1
Normal file
@ -0,0 +1,4 @@
|
||||
{"cmd": "config.option('options.unicode1').value.set('val')",
|
||||
"body": {"updates": [{"action": "modify",
|
||||
"name": "options.unicode1",
|
||||
"value": "val"}]}}
|
12
tests/dict/data/unicode2_symlink.py
Normal file
12
tests/dict/data/unicode2_symlink.py
Normal file
@ -0,0 +1,12 @@
|
||||
"""two unicode options
|
||||
"""
|
||||
from tiramisu.option import StrOption, OptionDescription, SymLinkOption
|
||||
|
||||
def get_description():
|
||||
"""generate description for this test
|
||||
"""
|
||||
option1 = StrOption('unicode1', "Unicode 1", 'test')
|
||||
option2 = SymLinkOption('unicode2', option1)
|
||||
descr1 = OptionDescription("options", "Common configuration", [option1, option2])
|
||||
descr = OptionDescription("unicode2_symlink", "One unicode, one symlink", [descr1])
|
||||
return descr
|
11
tests/dict/data/unicode2_symlink.updates1
Normal file
11
tests/dict/data/unicode2_symlink.updates1
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"updates": [
|
||||
"options.unicode1"
|
||||
],
|
||||
"model": {
|
||||
"options.unicode1": {
|
||||
"value": "val",
|
||||
"owner": "user"
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user