update tests ans version number

This commit is contained in:
Emmanuel Garette 2019-07-26 10:13:45 +02:00
parent fd18af62ca
commit 613ae47573
18 changed files with 28 additions and 43 deletions

View File

@ -23,8 +23,7 @@
"model": {
"options.choice": {
"required": true,
"value": "hide",
"owner": "default"
"value": "hide"
},
"options.unicode2": {
"display": false,

View File

@ -14,8 +14,7 @@
},
"model": {
"options.integer": {
"value": 0,
"owner": "default"
"value": 0
}
},
"global": {

View File

@ -6,11 +6,11 @@
"properties": {
"options.unicode.unicode": {
"type": "string",
"isMulti": true,
"value": [
"val1",
"val2"
],
"isMulti": true,
"title": "Unicode leader"
},
"options.unicode.unicode1": {
@ -44,17 +44,14 @@
"value": [
"val1",
"val2"
],
"owner": "default"
]
},
"options.unicode.unicode2": {
"0": {
"value": "follower2",
"owner": "default"
"value": "follower2"
},
"1": {
"value": "follower2",
"owner": "default"
"value": "follower2"
}
}
},

View File

@ -6,11 +6,11 @@
"properties": {
"options.unicode.unicode": {
"type": "string",
"isMulti": true,
"value": [
"val1",
"val2"
],
"isMulti": true,
"title": "Unicode leader"
},
"options.unicode.unicode1": {

View File

@ -2,10 +2,7 @@
"options.unicode.unicode1",
"options.unicode.unicode2",
"options.unicode.unicode3"],
"model": {"options.unicode.unicode": {"owner": "default",
"required": true,
"model": {"options.unicode.unicode": {"required": true,
"value": ["val1", "val2"]},
"options.unicode.unicode2": {"0": {"owner": "default",
"value": "follower2"},
"1": {"owner": "default",
"value": "follower2"}}}}
"options.unicode.unicode2": {"0": {"value": "follower2"},
"1": {"value": "follower2"}}}}

View File

@ -11,7 +11,6 @@
"owner": "user"},
"1": {"value": "test",
"owner": "user"},
"2": {"value": "follower2",
"owner": "default"}},
"2": {"value": "follower2"}},
"options.unicode.unicode3": {"1": {"value": "super",
"owner": "user"}}}}

View File

@ -9,8 +9,7 @@
"value": "pas test"},
"1": {"owner": "user",
"value": "test"},
"2": {"owner": "default",
"value": "follower2"}},
"2": {"value": "follower2"}},
"options.unicode.unicode3": {"1": {"owner": "user",
"value": "super"}}},
"updates": ["options.unicode.unicode", "options.unicode.unicode2"]}

View File

@ -8,7 +8,6 @@
"owner": "user"}},
"options.unicode.unicode2": {"0": {"value": "pas test",
"owner": "user"},
"1": {"value": "follower2",
"owner": "default"}},
"1": {"value": "follower2"}},
"options.unicode.unicode3": {"1": {"value": "super",
"owner": "user"}}}}

View File

@ -4,11 +4,11 @@
"properties": {
"options.unicode": {
"type": "string",
"isMulti": true,
"value": [
"a",
"b"
],
"isMulti": true,
"title": "String 1"
}
},

View File

@ -1,4 +1,3 @@
{"updates": ["options.unicode"],
"model": {"options.unicode": {"owner": "default",
"required": true,
"model": {"options.unicode": {"required": true,
"value": ["a", "b"]}}}

View File

@ -24,11 +24,11 @@
},
"descr2.unicode2_multi": {
"type": "string",
"isMulti": true,
"value": [
"a",
"b"
],
"isMulti": true,
"title": "Multi unicode 2"
}
},
@ -56,16 +56,14 @@
"required": true
},
"descr2.unicode2": {
"value": "a",
"owner": "default"
"value": "a"
},
"descr2.unicode2_multi": {
"required": true,
"value": [
"a",
"b"
],
"owner": "default"
]
},
"descr3.unicode3_multi": {
"required": true

View File

@ -4,11 +4,11 @@
"properties": {
"options.unicode": {
"type": "string",
"isMulti": true,
"value": [
"a",
"b"
],
"isMulti": true,
"title": "String 1"
}
},
@ -22,8 +22,7 @@
"value": [
"a",
"b"
],
"owner": "default"
]
}
},
"global": {

View File

@ -14,8 +14,7 @@
},
"model": {
"options.unicode1": {
"value": "word",
"owner": "default"
"value": "word"
}
},
"global": {

View File

@ -18,8 +18,7 @@
},
"model": {
"options.unicode1": {
"value": "test",
"owner": "default"
"value": "test"
}
},
"global": {

View File

@ -101,7 +101,8 @@ def test_owner_is_not_a_string(config_type):
assert cfg.option('dummy').value.get() is False
assert cfg.option('dummy').owner.get() == owners.default
assert cfg.option('dummy').owner.get() == 'default'
assert isinstance(cfg.option('dummy').owner.get(), owners.Owner)
if config_type == 'tiramisu':
assert isinstance(cfg.option('dummy').owner.get(), owners.Owner)
cfg.option('dummy').value.set(True)
assert cfg.option('dummy').owner.get() == 'user'

View File

@ -1,4 +1,4 @@
1rom .autopath import do_autopath
from .autopath import do_autopath
do_autopath()
from .config import config_type, get_config

View File

@ -45,4 +45,4 @@ allfuncs.extend(all_options)
del(all_options)
__all__ = tuple(allfuncs)
del(allfuncs)
__version__ = "3.0rc8"
__version__ = "3.0rc9"

View File

@ -742,7 +742,8 @@ class TiramisuDict:
value = childapi.value.get()
if value is not None and value != []:
obj['value'] = value
obj['owner'] = childapi.owner.get()
if not childapi.owner.isdefault():
obj['owner'] = childapi.owner.get()
def _get_value_with_exception(self,
obj,