import tiramisu-json in tiramisu repository

This commit is contained in:
Emmanuel Garette 2019-04-08 08:41:33 +02:00
parent 48b3b7e8a4
commit 1aec891408
176 changed files with 5878 additions and 202 deletions

View file

@ -1,4 +1,9 @@
Mon Apr 8 08:40:10 2019 +0200 Emmanuel Garette <egarette@cadoles.com>
* version 3.0 rc6
* import tiramisu-json in tiramisu repository
Fri Apr 5 20:57:05 2019 +0200 Emmanuel Garette <egarette@cadoles.com> Fri Apr 5 20:57:05 2019 +0200 Emmanuel Garette <egarette@cadoles.com>
* version 3.0 rc4 and rc5
* change filename/directory name with Python Packaging Autority * change filename/directory name with Python Packaging Autority
recommendations recommendations
* do not change Config contexts properties when reload in MetaConfig * do not change Config contexts properties when reload in MetaConfig

0
tests/dict/__init__.py Normal file
View file

View file

View file

@ -0,0 +1,26 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.boolean": {
"name": "options.boolean",
"type": "boolean",
"title": "Boolean 1"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {},
"form": {
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,12 @@
"""just an boolean option
"""
from tiramisu.option import BoolOption, OptionDescription
def get_description():
"""generate description for this test
"""
option = BoolOption('boolean', "Boolean 1")
descr1 = OptionDescription("options", "Common configuration", [option])
descr = OptionDescription("boolean1", "Simple boolean", [descr1])
return descr

View file

@ -0,0 +1,30 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.boolean": {
"name": "options.boolean",
"type": "boolean",
"title": "Boolean 1 frozen"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {
"options.boolean": {
"readOnly": true
}
},
"form": {
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,12 @@
"""just an boolean option
"""
from tiramisu.option import BoolOption, OptionDescription
def get_description():
"""generate description for this test
"""
option = BoolOption('boolean', "Boolean 1 frozen", properties=('frozen',))
descr1 = OptionDescription("options", "Common configuration", [option])
descr = OptionDescription("boolean1_frozen", "Simple boolean", [descr1])
return descr

View file

@ -0,0 +1,34 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.choice": {
"name": "options.choice",
"type": "choice",
"enum": [
"",
"choice 1",
"choice 2"
],
"title": "Choice description"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {},
"form": {
"options.choice": {
"type": "choice"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,10 @@
from tiramisu.option import ChoiceOption, OptionDescription
def get_description():
"""generate description for this test
"""
option = ChoiceOption('choice', "Choice description", ("choice 1", "choice 2"))
descr1 = OptionDescription("options", "Common configuration", [option])
descr = OptionDescription("choice1", "Simple choice", [descr1])
return descr

View file

@ -0,0 +1,38 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.choice": {
"name": "options.choice",
"type": "choice",
"enum": [
"",
"choice 1",
"choice 2"
],
"title": "Choice description frozen"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {
"options.choice": {
"readOnly": true
}
},
"form": {
"options.choice": {
"type": "choice"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,10 @@
from tiramisu.option import ChoiceOption, OptionDescription
def get_description():
"""generate description for this test
"""
option = ChoiceOption('choice', "Choice description frozen", ("choice 1", "choice 2"), properties=('frozen',))
descr1 = OptionDescription("options", "Common configuration", [option])
descr = OptionDescription("choice1_frozen", "Simple choice", [descr1])
return descr

View file

@ -0,0 +1,87 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.choice1": {
"name": "options.choice1",
"properties": {
"options.choice1.choice1": {
"name": "options.choice1.choice1",
"type": "choice",
"isMulti": true,
"enum": [
"choice 1",
"choice 2"
],
"title": "Choice description leader"
},
"options.choice1.choice2": {
"name": "options.choice1.choice2",
"type": "choice",
"isMulti": true,
"enum": [
"",
"choice 3",
"choice 4"
],
"title": "Choice description follower 1"
},
"options.choice1.choice3": {
"name": "options.choice1.choice3",
"type": "choice",
"isMulti": true,
"enum": [
"",
"choice 5",
"choice 6"
],
"title": "Choice description follower 2"
},
"options.choice1.choice4": {
"name": "options.choice1.choice4",
"type": "choice",
"isMulti": true,
"enum": [
"",
"choice 7",
"choice 8"
],
"title": "Choice description follower 3"
}
},
"type": "array",
"title": "Common configuration 1"
}
},
"type": "object",
"title": "Common configuration 2"
}
},
"model": {
"options.choice1.choice1": {
"required": true
}
},
"form": {
"options.choice1.choice1": {
"type": "choice"
},
"options.choice1.choice2": {
"type": "choice"
},
"options.choice1.choice3": {
"type": "choice"
},
"options.choice1.choice4": {
"type": "choice"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,16 @@
from tiramisu.option import ChoiceOption, OptionDescription
from tiramisu import Leadership
def get_description():
"""generate description for this test
"""
option = ChoiceOption('choice1', "Choice description leader", ("choice 1", "choice 2"), multi=True)
option1 = ChoiceOption('choice2', "Choice description follower 1", ("choice 3", "choice 4"), multi=True)
option2 = ChoiceOption('choice3', "Choice description follower 2", ("choice 5", "choice 6"), multi=True)
option3 = ChoiceOption('choice4', "Choice description follower 3", ("choice 7", "choice 8"), multi=True)
descr1 = Leadership("choice1", "Common configuration 1",
[option, option1, option2, option3])
descr = OptionDescription("options", "Common configuration 2", [descr1])
descr = OptionDescription("choice1_leadership", "Leader followers with choice", [descr])
return descr

View file

@ -0,0 +1,93 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.choice1": {
"name": "options.choice1",
"properties": {
"options.choice1.choice1": {
"name": "options.choice1.choice1",
"type": "choice",
"isMulti": true,
"enum": [
"choice 1",
"choice 2"
],
"title": "Choice description leader"
},
"options.choice1.choice2": {
"name": "options.choice1.choice2",
"type": "choice",
"isMulti": true,
"enum": [
"",
"choice 3",
"choice 4"
],
"title": "Choice description follower 1"
},
"options.choice1.choice3": {
"name": "options.choice1.choice3",
"type": "choice",
"isMulti": true,
"enum": [
"",
"choice 5",
"choice 6"
],
"title": "Choice description follower 2 hidden"
},
"options.choice1.choice4": {
"name": "options.choice1.choice4",
"type": "choice",
"isMulti": true,
"enum": [
"",
"choice 7",
"choice 8"
],
"title": "Choice description follower 3"
}
},
"type": "array",
"title": "Slave 2 is hidden"
}
},
"type": "object",
"title": "Common configuration 2"
}
},
"model": {
"options.choice1.choice1": {
"required": true
},
"options.choice1.choice3": {
"null": {
"display": false,
"hidden": true
}
}
},
"form": {
"options.choice1.choice1": {
"type": "choice"
},
"options.choice1.choice2": {
"type": "choice"
},
"options.choice1.choice3": {
"type": "choice"
},
"options.choice1.choice4": {
"type": "choice"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,16 @@
from tiramisu.option import ChoiceOption, OptionDescription
from tiramisu import Leadership
from tiramisu.setting import groups
def get_description():
"""generate description for this test
"""
option = ChoiceOption('choice1', "Choice description leader", ("choice 1", "choice 2"), multi=True)
option1 = ChoiceOption('choice2', "Choice description follower 1", ("choice 3", "choice 4"), multi=True)
option2 = ChoiceOption('choice3', "Choice description follower 2 hidden", ("choice 5", "choice 6"), multi=True, properties=('hidden',))
option3 = ChoiceOption('choice4', "Choice description follower 3", ("choice 7", "choice 8"), multi=True)
descr1 = Leadership("choice1", "Slave 2 is hidden",
[option, option1, option2, option3])
descr = OptionDescription("options", "Common configuration 2", [descr1])
descr = OptionDescription("choice1_leadership_hidden", "Leader follower with choice, one is hidden", [descr])
return descr

View file

@ -0,0 +1,97 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.choice1": {
"name": "options.choice1",
"properties": {
"options.choice1.choice1": {
"name": "options.choice1.choice1",
"type": "choice",
"isMulti": true,
"enum": [
"choice 1",
"choice 2"
],
"title": "Choice leader"
},
"options.choice1.choice2": {
"name": "options.choice1.choice2",
"type": "choice",
"isMulti": true,
"enum": [
"",
"choice 3",
"choice 4"
],
"title": "Choice follower 1"
},
"options.choice1.choice3": {
"name": "options.choice1.choice3",
"type": "choice",
"isMulti": true,
"enum": [
"",
"choice 5",
"choice 6"
],
"title": "Choice follower 2"
},
"options.choice1.choice4": {
"name": "options.choice1.choice4",
"type": "choice",
"isMulti": true,
"enum": [
"",
"choice 7",
"choice 8"
],
"title": "Choice follower 3"
}
},
"type": "array",
"title": "Common configuration 1"
}
},
"type": "object",
"title": "Common configuration 2"
}
},
"model": {
"options.choice1.choice1": {
"required": true,
"value": [
"choice 2"
],
"owner": "user"
},
"options.choice1.choice2": {
"0": {
"value": "choice 4",
"owner": "user"
}
}
},
"form": {
"options.choice1.choice1": {
"type": "choice"
},
"options.choice1.choice2": {
"type": "choice"
},
"options.choice1.choice3": {
"type": "choice"
},
"options.choice1.choice4": {
"type": "choice"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,25 @@
from tiramisu.option import ChoiceOption, OptionDescription
from tiramisu import Leadership
def get_description():
"""generate description for this test
"""
option = ChoiceOption('choice1', "Choice leader", ("choice 1", "choice 2"), multi=True)
option1 = ChoiceOption('choice2', "Choice follower 1", ("choice 3", "choice 4"), multi=True)
option2 = ChoiceOption('choice3', "Choice follower 2", ("choice 5", "choice 6"), multi=True)
option3 = ChoiceOption('choice4', "Choice follower 3", ("choice 7", "choice 8"), multi=True)
descr1 = Leadership("choice1", "Common configuration 1",
[option, option1, option2, option3])
descr = OptionDescription("options", "Common configuration 2", [descr1])
descr = OptionDescription("choice1_leadership_value", "Leader followers with choices, leader is 'choice 2' and follower 1 is 'choice 4'", [descr])
return descr
def get_values(api, allpath=False):
if allpath:
root = 'choice1_leadership_value.'
else:
root = ''
api.option(root + 'options.choice1.choice1').value.set(['choice 2'])
api.option(root + 'options.choice1.choice2', 0).value.set('choice 4')

View file

@ -0,0 +1,38 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.choice": {
"name": "options.choice",
"type": "choice",
"isMulti": true,
"enum": [
"choice 1",
"choice 2"
],
"title": "Choice description"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {
"options.choice": {
"required": true
}
},
"form": {
"options.choice": {
"type": "choice"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,10 @@
from tiramisu.option import ChoiceOption, OptionDescription
def get_description():
"""generate description for this test
"""
option = ChoiceOption('choice', "Choice description", ("choice 1", "choice 2"), multi=True)
descr1 = OptionDescription("options", "Common configuration", [option])
descr = OptionDescription("choice1_multi", "Multi choice", [descr1])
return descr

View file

@ -0,0 +1,38 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.choice": {
"name": "options.choice",
"type": "choice",
"enum": [
"",
"choice 1",
"choice 2"
],
"title": "Choice description"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {},
"form": {
"options.choice": {
"type": "choice",
"displayed": {
"choice 1": "renamed 1",
"choice 2": "renamed 2"
}
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,20 @@
from tiramisu.option import ChoiceOption, OptionDescription
def get_description():
"""generate description for this test
"""
option = ChoiceOption('choice', "Choice description", ("choice 1", "choice 2"))
descr1 = OptionDescription("options", "Common configuration", [option])
descr = OptionDescription("choice1_rename", "Rename displayed value", [descr1])
return descr
def get_form(allpath=False):
key = 'options.choice'
if allpath:
key = 'choice1_rename.' + key
return [{'key': key,
'displayed': {'choice 1': 'renamed 1',
'choice 2': 'renamed 2'}
}]

View file

@ -0,0 +1,71 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.choice": {
"name": "options.choice",
"type": "choice",
"value": "hide",
"enum": [
"hide",
"show"
],
"title": "Choice description"
},
"options.unicode2": {
"name": "options.unicode2",
"type": "string",
"title": "Unicode 2"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {
"options.choice": {
"required": true,
"value": "hide",
"owner": "default"
},
"options.unicode2": {
"hidden": true
}
},
"form": {
"options.choice": {
"clearable": true,
"type": "choice",
"dependencies": {
"default": {
"show": [
"options.unicode2"
]
},
"expected": {
"hide": {
"hide": [
"options.unicode2"
]
},
"show": {
"show": [
"options.unicode2"
]
}
}
}
},
"options.unicode2": {
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,12 @@
from tiramisu.option import ChoiceOption, StrOption, OptionDescription
def get_description():
"""generate description for this test
"""
option1 = ChoiceOption('choice', "Choice description", ("hide", "show"), default='hide', properties=('mandatory',))
option2 = StrOption('unicode2', "Unicode 2", requires=[{'option': option1,
'expected': 'hide',
'action': 'hidden'}])
descr1 = OptionDescription("options", "Common configuration", [option1, option2])
descr = OptionDescription("choice1_requires", "Choice with requirement", [descr1])
return descr

View file

@ -0,0 +1,26 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.date": {
"name": "options.date",
"type": "date",
"title": "Date description"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {},
"form": {
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

9
tests/dict/data/date1.py Normal file
View file

@ -0,0 +1,9 @@
from tiramisu.option import DateOption, OptionDescription
def get_description():
"""generate description for this test
"""
option = DateOption('date', "Date description")
descr1 = OptionDescription("options", "Common configuration", [option])
descr = OptionDescription("date1", "Simple date", [descr1])
return descr

View file

@ -0,0 +1,30 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.date": {
"name": "options.date",
"type": "date",
"title": "Date description frozen"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {
"options.date": {
"readOnly": true
}
},
"form": {
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,9 @@
from tiramisu.option import DateOption, OptionDescription
def get_description():
"""generate description for this test
"""
option = DateOption('date', "Date description frozen", properties=('frozen',))
descr1 = OptionDescription("options", "Common configuration", [option])
descr = OptionDescription("date1_frozen", "Simple date", [descr1])
return descr

View file

@ -0,0 +1,27 @@
{
"schema": {
"usbpath": {
"name": "usbpath",
"type": "filename",
"title": "Chemin d'acc\u00e8s"
}
},
"model": {
"usbpath": {
"required": true
}
},
"form": {
"usbpath": {
"pattern": "^[a-zA-Z0-9\\-\\._~/+]+$",
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
from tiramisu.option import FilenameOption, OptionDescription
def get_description():
usbpath = FilenameOption('usbpath', "Chemin d'accès", properties=('mandatory',))
descr = OptionDescription("filename1", "Simple filename", [usbpath])
return descr

View file

@ -0,0 +1,57 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.hostname1": {
"name": "options.hostname1",
"type": "domainname",
"title": "Domainname Description"
},
"options.hostname2": {
"name": "options.hostname2",
"type": "domainname",
"title": "Domainname without dot Description"
},
"options.hostname3": {
"name": "options.hostname3",
"type": "domainname",
"title": "Hostname or IP Description"
},
"options.hostname4": {
"name": "options.hostname4",
"type": "domainname",
"title": "Netbios Description"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {},
"form": {
"options.hostname1": {
"pattern": "^((?!-)[a-z0-9-]{1,63}\\.){1,}[a-z0-9-]{1,63}$",
"type": "input"
},
"options.hostname2": {
"pattern": "^((?!-)[a-z0-9-]{0,63}\\.){0,}[a-z0-9-]{1,63}$",
"type": "input"
},
"options.hostname3": {
"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"
},
"options.hostname4": {
"pattern": "^((?!-)[a-z0-9-]{1,15})$",
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,12 @@
from tiramisu.option import DomainnameOption, OptionDescription
def get_description():
"""generate description for this test
"""
option1 = DomainnameOption('hostname1', "Domainname Description")
option2 = DomainnameOption('hostname2', "Domainname without dot Description", allow_without_dot=True)
option3 = DomainnameOption('hostname3', "Hostname or IP Description", type_='hostname', allow_ip=True)
option4 = DomainnameOption('hostname4', "Netbios Description", type_='netbios')
descr1 = OptionDescription("options", "Common configuration", [option1, option2, option3, option4])
descr = OptionDescription("hostname1", "Simple hostnames", [descr1])
return descr

30
tests/dict/data/ip1.json Normal file
View file

@ -0,0 +1,30 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.ip": {
"name": "options.ip",
"type": "ip",
"title": "IP Description"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {},
"form": {
"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]?)$",
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

9
tests/dict/data/ip1.py Normal file
View file

@ -0,0 +1,9 @@
from tiramisu.option import IPOption, OptionDescription
def get_description():
"""generate description for this test
"""
option1 = IPOption('ip', "IP Description")
descr1 = OptionDescription("options", "Common configuration", [option1])
descr = OptionDescription("ip1", "Simple IP", [descr1])
return descr

View file

@ -0,0 +1,34 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.ip": {
"name": "options.ip",
"type": "ip",
"title": "IP Description frozen"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {
"options.ip": {
"readOnly": true
}
},
"form": {
"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]?)$",
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,9 @@
from tiramisu.option import IPOption, OptionDescription
def get_description():
"""generate description for this test
"""
option1 = IPOption('ip', "IP Description frozen", properties=('frozen',))
descr1 = OptionDescription("options", "Common configuration", [option1])
descr = OptionDescription("ip1_frozen", "Simple IP", [descr1])
return descr

View file

@ -0,0 +1,30 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.mail": {
"name": "options.mail",
"type": "email",
"title": "Mail Description"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {},
"form": {
"options.mail": {
"pattern": "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$",
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

10
tests/dict/data/mail1.py Normal file
View file

@ -0,0 +1,10 @@
from tiramisu.option import EmailOption, OptionDescription
def get_description():
"""generate description for this test
"""
option = EmailOption('mail', "Mail Description")
descr1 = OptionDescription("options", "Common configuration", [option])
descr = OptionDescription("mail1", "Simple mail", [descr1])
return descr

View file

@ -0,0 +1,30 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.integer": {
"name": "options.integer",
"type": "integer",
"title": "integer 1"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {},
"form": {
"options.integer": {
"allowedpattern": "[0-9]",
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,10 @@
from tiramisu.option import IntOption, OptionDescription
def get_description():
"""generate description for this test
"""
option = IntOption('integer', "integer 1")
descr1 = OptionDescription("options", "Common configuration", [option])
descr = OptionDescription("number1", "Simple number", [descr1])
return descr

View file

@ -0,0 +1,34 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.integer": {
"name": "options.integer",
"type": "integer",
"title": "integer 1 frozen"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {
"options.integer": {
"readOnly": true
}
},
"form": {
"options.integer": {
"allowedpattern": "[0-9]",
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,10 @@
from tiramisu.option import IntOption, OptionDescription
def get_description():
"""generate description for this test
"""
option = IntOption('integer', "integer 1 frozen", properties=('frozen',))
descr1 = OptionDescription("options", "Common configuration", [option])
descr = OptionDescription("number1_frozen", "Simple number", [descr1])
return descr

View file

@ -0,0 +1,37 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.integer": {
"name": "options.integer",
"type": "integer",
"value": 0,
"title": "integer 1"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {
"options.integer": {
"value": 3,
"owner": "user"
}
},
"form": {
"options.integer": {
"clearable": true,
"allowedpattern": "[0-9]",
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,18 @@
from tiramisu.option import IntOption, OptionDescription
def get_description():
"""generate description for this test
"""
option = IntOption('integer', "integer 1", 0)
descr1 = OptionDescription("options", "Common configuration", [option])
descr = OptionDescription("number1_mod_value", "Number with modified value 3 and default value 0", [descr1])
return descr
def get_values(api, allpath=False):
if allpath:
root = 'number1_mod_value.'
else:
root = ''
api.option(root + 'options.integer').value.set(3)

View file

@ -0,0 +1,37 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.integer": {
"name": "options.integer",
"type": "integer",
"value": 0,
"title": "integer 1"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {
"options.integer": {
"value": 0,
"owner": "default"
}
},
"form": {
"options.integer": {
"clearable": true,
"allowedpattern": "[0-9]",
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,11 @@
from tiramisu.option import IntOption, OptionDescription
def get_description():
"""generate description for this test
"""
option = IntOption('integer', "integer 1", 0)
descr1 = OptionDescription("options", "Common configuration", [option])
descr = OptionDescription("number1_value", "Number with value 0", [descr1])
return descr

View file

@ -0,0 +1 @@
{"options.unicode": null}

View file

@ -0,0 +1 @@
{"options.unicode": "val"}

View file

@ -0,0 +1,29 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.unicode": {
"name": "options.unicode",
"type": "string",
"title": "Unicode 1"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {},
"form": {
"options.unicode": {
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,5 @@
{"cmd": "config.option('options.unicode').value.set('val')",
"body": {"updates": [{"action": "modify",
"name": "options.unicode",
"value": "val"}]}
}

View file

@ -0,0 +1,11 @@
"""just an unicode option
"""
from tiramisu.option import StrOption, OptionDescription
def get_description():
"""generate description for this test
"""
option = StrOption('unicode', "Unicode 1")
descr1 = OptionDescription("options", "Common configuration", [option])
descr = OptionDescription("unicode1", "Simple unicode", [descr1])
return descr

View file

@ -0,0 +1,3 @@
{"updates": ["options.unicode"],
"model": {"options.unicode": {"owner": "user",
"value": "val"}}}

View file

@ -0,0 +1,33 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.unicode": {
"name": "options.unicode",
"type": "string",
"title": "Unicode 1 frozen"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {
"options.unicode": {
"readOnly": true
}
},
"form": {
"options.unicode": {
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,11 @@
"""just an unicode option
"""
from tiramisu.option import StrOption, OptionDescription
def get_description():
"""generate description for this test
"""
option = StrOption('unicode', "Unicode 1 frozen", properties=('frozen',))
descr1 = OptionDescription("options", "Common configuration", [option])
descr = OptionDescription("unicode1_frozen", "Simple unicode", [descr1])
return descr

View file

@ -0,0 +1,70 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.unicode": {
"name": "options.unicode",
"properties": {
"options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string",
"isMulti": true,
"title": "Unicode leader"
},
"options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string",
"isMulti": true,
"title": "Unicode follower 1"
},
"options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string",
"isMulti": true,
"title": "Unicode follower 2"
},
"options.unicode.unicode3": {
"name": "options.unicode.unicode3",
"type": "string",
"isMulti": true,
"title": "Unicode follower 3"
}
},
"type": "array",
"title": "Common configuration"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {
"options.unicode.unicode": {
"display": false,
"required": true,
"hidden": true
}
},
"form": {
"options.unicode.unicode": {
"type": "input"
},
"options.unicode.unicode1": {
"type": "input"
},
"options.unicode.unicode2": {
"type": "input"
},
"options.unicode.unicode3": {
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,15 @@
from tiramisu.option import UnicodeOption, OptionDescription
from tiramisu import Leadership
def get_description():
"""generate description for this test
"""
option = UnicodeOption('unicode', "Unicode leader", multi=True, properties=('hidden',))
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
option2 = UnicodeOption('unicode2', "Unicode follower 2", multi=True)
option3 = UnicodeOption('unicode3', "Unicode follower 3", multi=True)
descr1 = Leadership("unicode", "Common configuration",
[option, option1, option2, option3])
descr = OptionDescription("options", "Common configuration", [descr1])
descr = OptionDescription("unicode1_leader_hidden_followers", "Leader follower with unicode and hidden leader", [descr])
return descr

View file

@ -0,0 +1,68 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.unicode": {
"name": "options.unicode",
"properties": {
"options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string",
"isMulti": true,
"title": "Unicode leader"
},
"options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string",
"isMulti": true,
"title": "Unicode follower 1"
},
"options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string",
"isMulti": true,
"title": "Unicode follower 2"
},
"options.unicode.unicode3": {
"name": "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
}
},
"form": {
"options.unicode.unicode": {
"type": "input"
},
"options.unicode.unicode1": {
"type": "input"
},
"options.unicode.unicode2": {
"type": "input"
},
"options.unicode.unicode3": {
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,15 @@
from tiramisu.option import UnicodeOption, OptionDescription, Leadership
def get_description():
"""generate description for this test
"""
option = UnicodeOption('unicode', "Unicode leader", multi=True)
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
option2 = UnicodeOption('unicode2', "Unicode follower 2", multi=True)
option3 = UnicodeOption('unicode3', "Unicode follower 3", multi=True)
descr1 = Leadership("unicode", "Common configuration 1",
[option, option1, option2, option3])
descr = OptionDescription("options", "Common configuration 2", [descr1])
descr = OptionDescription("unicode1_leadership", "Leader followers with Unicode", [descr])
return descr

View file

@ -0,0 +1,90 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.unicode": {
"name": "options.unicode",
"properties": {
"options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string",
"value": [
"val1",
"val2"
],
"isMulti": true,
"title": "Unicode leader"
},
"options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string",
"isMulti": true,
"title": "Unicode follower 1"
},
"options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string",
"default": "follower2",
"isMulti": true,
"title": "Unicode follower 2 with default multi"
},
"options.unicode.unicode3": {
"name": "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,
"value": [
"val1",
"val2"
],
"owner": "default"
},
"options.unicode.unicode2": {
"0": {
"value": "follower2",
"owner": "default"
},
"1": {
"value": "follower2",
"owner": "default"
}
}
},
"form": {
"options.unicode.unicode": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode1": {
"type": "input"
},
"options.unicode.unicode2": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode3": {
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,16 @@
from tiramisu.option import UnicodeOption, OptionDescription
from tiramisu import Leadership
from tiramisu.setting import groups
def get_description():
"""generate description for this test
"""
option = UnicodeOption('unicode', "Unicode leader", ['val1', 'val2'], multi=True)
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
option2 = UnicodeOption('unicode2', "Unicode follower 2 with default multi", default_multi="follower2", multi=True)
option3 = UnicodeOption('unicode3', "Unicode follower 3", multi=True)
descr1 = Leadership("unicode", "Common configuration 1",
[option, option1, option2, option3])
descr = OptionDescription("options", "Common configuration 2", [descr1])
descr = OptionDescription("unicode1_leadership_default_value", "Leader followers with unicode with default value", [descr])
return descr

View file

@ -0,0 +1,89 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.unicode": {
"name": "options.unicode",
"properties": {
"options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string",
"isMulti": true,
"title": "Unicode leader"
},
"options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string",
"isMulti": true,
"title": "Unicode follower 1"
},
"options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string",
"isMulti": true,
"title": "Unicode follower 2 hidden"
},
"options.unicode.unicode3": {
"name": "options.unicode.unicode3",
"type": "string",
"isMulti": true,
"title": "Unicode follower 3"
}
},
"type": "array",
"title": "Common configuration"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {
"options.unicode.unicode": {
"required": true,
"value": [
"val1",
"val2"
],
"owner": "user"
},
"options.unicode.unicode2": {
"0": {
"display": false,
"hidden": true,
"value": "super",
"owner": "user"
},
"1": {
"display": false,
"hidden": true
},
"null": {
"display": false,
"hidden": true
}
}
},
"form": {
"options.unicode.unicode": {
"type": "input"
},
"options.unicode.unicode1": {
"type": "input"
},
"options.unicode.unicode2": {
"type": "input"
},
"options.unicode.unicode3": {
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,25 @@
from tiramisu.option import UnicodeOption, OptionDescription
from tiramisu import Leadership
def get_description():
"""generate description for this test
"""
option = UnicodeOption('unicode', "Unicode leader", multi=True)
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
option2 = UnicodeOption('unicode2', "Unicode follower 2 hidden", multi=True, properties=('hidden',))
option3 = UnicodeOption('unicode3', "Unicode follower 3", multi=True)
descr1 = Leadership("unicode", "Common configuration",
[option, option1, option2, option3])
descr = OptionDescription("options", "Common configuration", [descr1])
descr = OptionDescription("unicode1_leadership_hidden", "Leader followers with second follower hidden", [descr])
return descr
def get_values(api, allpath=False):
if allpath:
root = 'unicode1_leadership_hidden.'
else:
root = ''
api.option(root + 'options.unicode.unicode').value.set([u'val1', u'val2'])
api.option(root + 'options.unicode.unicode2', 0).value.set(u'super')

View file

@ -0,0 +1,67 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.unicode": {
"name": "options.unicode",
"type": "string",
"title": "Unicode leader"
},
"options.unicode1": {
"name": "options.unicode1",
"properties": {
"options.unicode1.unicode1": {
"name": "options.unicode1.unicode1",
"type": "string",
"isMulti": true,
"title": "Unicode follower 1"
},
"options.unicode1.unicode2": {
"name": "options.unicode1.unicode2",
"type": "string",
"isMulti": true,
"title": "Unicode follower 2"
},
"options.unicode1.unicode3": {
"name": "options.unicode1.unicode3",
"type": "string",
"isMulti": true,
"title": "Unicode follower 3"
}
},
"type": "array",
"title": "Common configuration"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {
"options.unicode1.unicode1": {
"required": true
}
},
"form": {
"options.unicode": {
"type": "input"
},
"options.unicode1.unicode1": {
"type": "input"
},
"options.unicode1.unicode2": {
"type": "input"
},
"options.unicode1.unicode3": {
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,16 @@
from tiramisu.option import UnicodeOption, OptionDescription
from tiramisu import Leadership
def get_description():
"""generate description for this test
"""
option = UnicodeOption('unicode', "Unicode leader")
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
option2 = UnicodeOption('unicode2', "Unicode follower 2", multi=True)
option3 = UnicodeOption('unicode3', "Unicode follower 3", multi=True)
descr1 = Leadership("unicode1", "Common configuration",
[option1, option2, option3])
descr = OptionDescription("options", "Common configuration", [option, descr1])
descr = OptionDescription("unicode1_leadership_hidden_all_default", "FIXME...", [descr])
return descr

View file

@ -0,0 +1,78 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.unicode": {
"name": "options.unicode",
"properties": {
"options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string",
"isMulti": true,
"title": "Unicode leader"
},
"options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string",
"isMulti": true,
"title": "Unicode follower 1"
},
"options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string",
"isMulti": true,
"title": "Unicode follower 2 not equal"
},
"options.unicode.unicode3": {
"name": "options.unicode.unicode3",
"type": "string",
"isMulti": true,
"title": "Unicode follower 3 not equal"
}
},
"type": "array",
"title": "Common configuration 1"
}
},
"type": "object",
"title": "Common configuration 2"
}
},
"model": {
"options.unicode.unicode": {
"required": true
}
},
"form": {
"options.unicode.unicode": {
"type": "input"
},
"options.unicode.unicode1": {
"type": "input"
},
"options.unicode.unicode2": {
"type": "input",
"not_equal": {
"options": [
"options.unicode.unicode3"
]
}
},
"options.unicode.unicode3": {
"type": "input",
"not_equal": {
"options": [
"options.unicode.unicode2"
]
}
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,17 @@
from tiramisu.option import UnicodeOption, OptionDescription
from tiramisu import Leadership
def get_description():
"""generate description for this test
"""
option = UnicodeOption('unicode', "Unicode leader", multi=True)
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
option2 = UnicodeOption('unicode2', "Unicode follower 2 not equal", multi=True)
option3 = UnicodeOption('unicode3', "Unicode follower 3 not equal", multi=True)
option2.impl_add_consistency('not_equal', option3)
descr1 = Leadership("unicode", "Common configuration 1",
[option, option1, option2, option3])
descr = OptionDescription("options", "Common configuration 2", [descr1])
descr = OptionDescription("unicode1_leadership_not_equal", "Leader followers with follower not equal", [descr])
return descr

View file

@ -0,0 +1,82 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.unicode": {
"name": "options.unicode",
"properties": {
"options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string",
"isMulti": true,
"title": "Unicode leader"
},
"options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string",
"isMulti": true,
"title": "Unicode follower 1"
},
"options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string",
"isMulti": true,
"title": "Values 'test' must show 'Unicode follower 3'"
},
"options.unicode.unicode3": {
"name": "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
}
},
"form": {
"options.unicode.unicode": {
"type": "input"
},
"options.unicode.unicode1": {
"type": "input"
},
"options.unicode.unicode2": {
"type": "input",
"dependencies": {
"default": {
"hide": [
"options.unicode.unicode3"
]
},
"expected": {
"test": {
"show": [
"options.unicode.unicode3"
]
}
}
}
},
"options.unicode.unicode3": {
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,20 @@
from tiramisu.option import UnicodeOption, OptionDescription
from tiramisu import Leadership
def get_description():
"""generate description for this test
"""
option = UnicodeOption('unicode', "Unicode leader", multi=True)
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
option2 = UnicodeOption('unicode2', "Values 'test' must show 'Unicode follower 3'", multi=True)
option3 = UnicodeOption('unicode3', "Unicode follower 3", requires=[{'option': option2,
'expected': u'test',
'action': 'hidden',
'inverse': True}],
multi=True)
descr1 = Leadership("unicode", "Common configuration 1",
[option, option1, option2, option3])
descr = OptionDescription("options", "Common configuration 2", [descr1])
descr = OptionDescription("unicode1_leadership_requires", "Leader followers with Unicode follower 3 hidden when Unicode follower 2 is test", [descr])
return descr

View file

@ -0,0 +1,87 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.unicode": {
"name": "options.unicode",
"type": "string",
"title": "Value 'test' must show Leadership"
},
"options.unicode1": {
"name": "options.unicode1",
"properties": {
"options.unicode1.unicode1": {
"name": "options.unicode1.unicode1",
"type": "string",
"isMulti": true,
"title": "Unicode leader"
},
"options.unicode1.unicode2": {
"name": "options.unicode1.unicode2",
"type": "string",
"isMulti": true,
"title": "Unicode follower 1"
},
"options.unicode1.unicode3": {
"name": "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"
}

View file

@ -0,0 +1,19 @@
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 Leadership")
option1 = UnicodeOption('unicode1', "Unicode leader", multi=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], requires=[{'option': option,
'expected': u'test',
'action': 'hidden',
'inverse': True}])
descr = OptionDescription("options", "Common configuration", [option, descr1])
descr = OptionDescription("unicode1_leadership_requires_all", "Leader follower with requirement", [descr])
return descr

View file

@ -0,0 +1,73 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.unicode1": {
"name": "options.unicode1",
"properties": {
"options.unicode1.unicode1": {
"name": "options.unicode1.unicode1",
"type": "string",
"isMulti": true,
"title": "Values 'test' must show 'Unicode follower 2'"
},
"options.unicode1.unicode2": {
"name": "options.unicode1.unicode2",
"type": "string",
"isMulti": true,
"title": "Unicode follower 1"
},
"options.unicode1.unicode3": {
"name": "options.unicode1.unicode3",
"type": "string",
"isMulti": true,
"title": "Unicode follower 2"
}
},
"type": "array",
"title": "Common configuration"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {
"options.unicode1.unicode1": {
"required": true
}
},
"form": {
"options.unicode1.unicode1": {
"type": "input",
"dependencies": {
"default": {
"hide": [
"options.unicode1.unicode3"
]
},
"expected": {
"test": {
"show": [
"options.unicode1.unicode3"
]
}
}
}
},
"options.unicode1.unicode2": {
"type": "input"
},
"options.unicode1.unicode3": {
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,19 @@
from tiramisu.option import UnicodeOption, OptionDescription
from tiramisu import Leadership
def get_description():
"""generate description for this test
"""
option1 = UnicodeOption('unicode1', "Values 'test' must show 'Unicode follower 2'", multi=True)
option2 = UnicodeOption('unicode2', "Unicode follower 1", multi=True)
option3 = UnicodeOption('unicode3', "Unicode follower 2", multi=True,
requires=[{'option': option1,
'expected': u'test',
'action': 'hidden',
'inverse': True}])
descr1 = Leadership("unicode1", "Common configuration",
[option1, option2, option3])
descr = OptionDescription("options", "Common configuration", [descr1])
descr = OptionDescription("unicode1_leadership_requires_follower", "Leader follower requires follower with leader", [descr])
return descr

View file

@ -0,0 +1,93 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.unicode1": {
"name": "options.unicode1",
"properties": {
"options.unicode1.unicode1": {
"name": "options.unicode1.unicode1",
"type": "string",
"isMulti": true,
"title": "Values 'test' must show 'Unicode follower 2'"
},
"options.unicode1.unicode2": {
"name": "options.unicode1.unicode2",
"type": "string",
"isMulti": true,
"title": "Unicode follower 1"
},
"options.unicode1.unicode3": {
"name": "options.unicode1.unicode3",
"type": "string",
"isMulti": true,
"title": "Unicode follower 2"
}
},
"type": "array",
"title": "Common configuration"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {
"options.unicode1.unicode1": {
"required": true,
"value": [
"test",
"pas test"
],
"owner": "user"
},
"options.unicode1.unicode2": {
"0": {
"value": "super1",
"owner": "user"
}
},
"options.unicode1.unicode3": {
"0": {
"value": "super1",
"owner": "user"
},
"1": {
"hidden": true
}
}
},
"form": {
"options.unicode1.unicode1": {
"type": "input",
"dependencies": {
"default": {
"hide": [
"options.unicode1.unicode3"
]
},
"expected": {
"test": {
"show": [
"options.unicode1.unicode3"
]
}
}
}
},
"options.unicode1.unicode2": {
"type": "input"
},
"options.unicode1.unicode3": {
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,29 @@
from tiramisu.option import UnicodeOption, OptionDescription
from tiramisu import Leadership
def get_description():
"""generate description for this test
"""
option1 = UnicodeOption('unicode1', "Values 'test' must show 'Unicode follower 2'", multi=True)
option2 = UnicodeOption('unicode2', "Unicode follower 1", multi=True)
option3 = UnicodeOption('unicode3', "Unicode follower 2", multi=True,
requires=[{'option': option1,
'expected': u'test',
'action': 'hidden',
'inverse': True}])
descr1 = Leadership("unicode1", "Common configuration",
[option1, option2, option3])
descr = OptionDescription("options", "Common configuration", [descr1])
descr = OptionDescription("unicode1_leadership_requires_follower_value", "Leader follower requires follower with leader value", [descr])
return descr
def get_values(api, allpath=False):
if allpath:
root = 'unicode1_leadership_requires_follower_value.'
else:
root = ''
api.option(root + 'options.unicode1.unicode1').value.set([u'test', u'pas test'])
api.option(root + 'options.unicode1.unicode2', 0).value.set(u'super1')
api.option(root + 'options.unicode1.unicode3', 0).value.set(u'super1')

View file

@ -0,0 +1,73 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.unicode1": {
"name": "options.unicode1",
"properties": {
"options.unicode1.unicode1": {
"name": "options.unicode1.unicode1",
"type": "string",
"isMulti": true,
"title": "Unicode leader"
},
"options.unicode1.unicode2": {
"name": "options.unicode1.unicode2",
"type": "string",
"isMulti": true,
"title": "Values 'test' must show 'Unicode follower 2'"
},
"options.unicode1.unicode3": {
"name": "options.unicode1.unicode3",
"type": "string",
"isMulti": true,
"title": "Unicode follower 2"
}
},
"type": "array",
"title": "Common configuration"
}
},
"type": "object",
"title": "Common configuration"
}
},
"model": {
"options.unicode1.unicode1": {
"required": true
}
},
"form": {
"options.unicode1.unicode1": {
"type": "input"
},
"options.unicode1.unicode2": {
"type": "input",
"dependencies": {
"default": {
"hide": [
"options.unicode1.unicode3"
]
},
"expected": {
"test": {
"show": [
"options.unicode1.unicode3"
]
}
}
}
},
"options.unicode1.unicode3": {
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,19 @@
from tiramisu.option import UnicodeOption, OptionDescription
from tiramisu import Leadership
def get_description():
"""generate description for this test
"""
option1 = UnicodeOption('unicode1', "Unicode leader", multi=True)
option2 = UnicodeOption('unicode2', "Values 'test' must show 'Unicode follower 2'", multi=True)
option3 = UnicodeOption('unicode3', "Unicode follower 2", multi=True,
requires=[{'option': option2,
'expected': u'test',
'action': 'hidden',
'inverse': True}])
descr1 = Leadership("unicode1", "Common configuration",
[option1, option2, option3])
descr = OptionDescription("options", "Common configuration", [descr1])
descr = OptionDescription("unicode1_leadership_requires_followers", "Leader follower requires follower with a follower", [descr])
return descr

View file

@ -0,0 +1,87 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.unicode": {
"name": "options.unicode",
"type": "string",
"title": "Value 'test' must show leader"
},
"options.unicode1": {
"name": "options.unicode1",
"properties": {
"options.unicode1.unicode1": {
"name": "options.unicode1.unicode1",
"type": "string",
"isMulti": true,
"title": "Unicode leader"
},
"options.unicode1.unicode2": {
"name": "options.unicode1.unicode2",
"type": "string",
"isMulti": true,
"title": "Unicode follower 1"
},
"options.unicode1.unicode3": {
"name": "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"
}

View file

@ -0,0 +1,19 @@
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

View file

@ -0,0 +1,114 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.unicode": {
"name": "options.unicode",
"properties": {
"options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string",
"isMulti": true,
"title": "Values 'test' must show 'Unicode follower 3'"
},
"options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string",
"isMulti": true,
"title": "Unicode follower 1"
},
"options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string",
"isMulti": true,
"title": "Unicode follower 2"
},
"options.unicode.unicode3": {
"name": "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,
"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,
"value": "super",
"owner": "user"
}
}
},
"form": {
"options.unicode.unicode": {
"type": "input",
"dependencies": {
"default": {
"hide": [
"options.unicode.unicode3"
]
},
"expected": {
"test": {
"show": [
"options.unicode.unicode3"
]
}
}
}
},
"options.unicode.unicode1": {
"type": "input"
},
"options.unicode.unicode2": {
"type": "input"
},
"options.unicode.unicode3": {
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,33 @@
from tiramisu.option import UnicodeOption, OptionDescription
from tiramisu import Leadership
def get_description():
"""generate description for this test
"""
option = UnicodeOption('unicode', "Values 'test' must show 'Unicode follower 3'", multi=True)
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
option2 = UnicodeOption('unicode2', "Unicode follower 2", multi=True)
option3 = UnicodeOption('unicode3', "Unicode follower 3", requires=[{'option': option,
'expected': u'test',
'action': 'hidden',
'inverse': True}],
multi=True)
descr1 = Leadership("unicode", "Common configuration 1",
[option, option1, option2, option3])
descr = OptionDescription("options", "Common configuration 2", [descr1])
descr = OptionDescription("unicode1_leadership_requires_value", "Leader followers with Unicode follower 3 hidden when Unicode follower 2 is test and modified value", [descr])
return descr
def get_values(api, allpath=False):
if allpath:
root = 'unicode1_leadership_requires_value.'
else:
root = ''
api.option(root + 'options.unicode.unicode').value.set([u'test', u'val2'])
api.option(root + 'options.unicode.unicode1', 0).value.set(u'super1')
api.option(root + 'options.unicode.unicode1', 1).value.set(u'super2')
api.option(root + 'options.unicode.unicode2', 0).value.set(u'pas test')
api.option(root + 'options.unicode.unicode2', 1).value.set(u'test')
api.option(root + 'options.unicode.unicode3', 1).value.set(u'super')

View file

@ -0,0 +1,69 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.unicode": {
"name": "options.unicode",
"properties": {
"options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string",
"isMulti": true,
"title": "Unicode leader"
},
"options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string",
"isMulti": true,
"title": "Unicode follower 1"
},
"options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string",
"isMulti": true,
"isSubMulti": true,
"title": "Unicode follower 2 submulti"
},
"options.unicode.unicode3": {
"name": "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
}
},
"form": {
"options.unicode.unicode": {
"type": "input"
},
"options.unicode.unicode1": {
"type": "input"
},
"options.unicode.unicode2": {
"type": "input"
},
"options.unicode.unicode3": {
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,17 @@
from tiramisu.option import UnicodeOption, OptionDescription, submulti
from tiramisu import Leadership
def get_description():
"""generate description for this test
"""
option = UnicodeOption('unicode', "Unicode leader", multi=True)
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
option2 = UnicodeOption('unicode2', "Unicode follower 2 submulti", multi=submulti)
option3 = UnicodeOption('unicode3', "Unicode follower 3", multi=True)
descr1 = Leadership("unicode", "Common configuration 1",
[option, option1, option2, option3])
descr = OptionDescription("options", "Common configuration 2", [descr1])
descr = OptionDescription("unicode1_leadership_submulti", "Leader followers with submulti Unicode", [descr])
return descr

View file

@ -0,0 +1,4 @@
{"options.unicode.unicode": ["val3", "val4"],
"options.unicode.unicode1": ["super1", "super2"],
"options.unicode.unicode2": ["pas test", "test"],
"options.unicode.unicode3": [null, "super"]}

View file

@ -0,0 +1,4 @@
{"options.unicode.unicode": ["val1", "val2"],
"options.unicode.unicode1": [null, null],
"options.unicode.unicode2": ["follower2", "follower2"],
"options.unicode.unicode3": [null, null]}

View file

@ -0,0 +1,4 @@
{"options.unicode.unicode": ["val3"],
"options.unicode.unicode1": ["super1"],
"options.unicode.unicode2": ["pas test"],
"options.unicode.unicode3": [null]}

View file

@ -0,0 +1,4 @@
{"options.unicode.unicode": ["val3", "val4", "val5"],
"options.unicode.unicode1": ["super1", "super2", null],
"options.unicode.unicode2": ["pas test", "test", "follower2"],
"options.unicode.unicode3": [null, "super", null]}

View file

@ -0,0 +1,4 @@
{"options.unicode.unicode": ["val3", "val4", "val5"],
"options.unicode.unicode1": ["super1", "super2", null],
"options.unicode.unicode2": ["pas test", "test", "follower2"],
"options.unicode.unicode3": [null, "super", null]}

View file

@ -0,0 +1,4 @@
{"options.unicode.unicode": ["val3", "val4"],
"options.unicode.unicode1": ["super1", "super2"],
"options.unicode.unicode2": ["pas test", "follower2"],
"options.unicode.unicode3": [null, "super"]}

View file

@ -0,0 +1,4 @@
{"options.unicode.unicode": ["val3", "val4"],
"options.unicode.unicode1": ["super1", "super2"],
"options.unicode.unicode2": ["pas test", "test2"],
"options.unicode.unicode3": [null, "super"]}

View file

@ -0,0 +1,106 @@
{
"schema": {
"options": {
"name": "options",
"properties": {
"options.unicode": {
"name": "options.unicode",
"properties": {
"options.unicode.unicode": {
"name": "options.unicode.unicode",
"type": "string",
"value": [
"val1",
"val2"
],
"isMulti": true,
"title": "Unicode leader"
},
"options.unicode.unicode1": {
"name": "options.unicode.unicode1",
"type": "string",
"isMulti": true,
"title": "Unicode follower 1"
},
"options.unicode.unicode2": {
"name": "options.unicode.unicode2",
"type": "string",
"default": "follower2",
"isMulti": true,
"title": "Unicode follower 2 with default multi"
},
"options.unicode.unicode3": {
"name": "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,
"value": [
"val3",
"val4"
],
"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": {
"value": "super",
"owner": "user"
}
}
},
"form": {
"options.unicode.unicode": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode1": {
"type": "input"
},
"options.unicode.unicode2": {
"clearable": true,
"type": "input"
},
"options.unicode.unicode3": {
"type": "input"
},
"null": [
{
"title": "Configurer",
"type": "submit"
}
]
},
"version": "1.0"
}

View file

@ -0,0 +1,3 @@
{"cmd": "config.option('options.unicode.unicode').value.reset()",
"body": {"updates": [{"action": "delete",
"name": "options.unicode.unicode"}]}}

View file

@ -0,0 +1,4 @@
{"cmd": "config.option('options.unicode.unicode', 1).value.reset()",
"body": {"updates": [{"action": "delete",
"index": 1,
"name": "options.unicode.unicode"}]}}

View file

@ -0,0 +1,4 @@
{"cmd": "config.option('options.unicode.unicode').value.set(['val3', 'val4', 'val5'])",
"body": {"updates": [{"action": "modify",
"name": "options.unicode.unicode",
"value": ["val3", "val4", "val5"]}]}}

View file

@ -0,0 +1,4 @@
{"cmd": "config.option('options.unicode.unicode').value.set(['val3', 'val4', 'val5'])",
"body": {"updates": [{"action": "modify",
"name": "options.unicode.unicode",
"value": ["val3", "val4", "val5"]}]}}

View file

@ -0,0 +1,4 @@
{"cmd": "config.option('options.unicode.unicode2', 1).value.reset()",
"body": {"updates": [{"action": "delete",
"name": "options.unicode.unicode2",
"index": 1}]}}

View file

@ -0,0 +1,5 @@
{"cmd": "config.option('options.unicode.unicode2', 1).value.set('test2')",
"body": {"updates": [{"action": "modify",
"name": "options.unicode.unicode2",
"index": 1,
"value": "test2"}]}}

View file

@ -0,0 +1,29 @@
from tiramisu.option import UnicodeOption, OptionDescription
from tiramisu import Leadership
def get_description():
"""generate description for this test
"""
option = UnicodeOption('unicode', "Unicode leader", ['val1', 'val2'], multi=True)
option1 = UnicodeOption('unicode1', "Unicode follower 1", multi=True)
option2 = UnicodeOption('unicode2', "Unicode follower 2 with default multi", default_multi="follower2", multi=True)
option3 = UnicodeOption('unicode3', "Unicode follower 3", multi=True)
descr1 = Leadership("unicode", "Common configuration 1",
[option, option1, option2, option3])
descr = OptionDescription("options", "Common configuration 2", [descr1])
descr = OptionDescription("unicode1_leadership_value", "Leader followers with unicode with default value", [descr])
return descr
def get_values(api, allpath=False):
if allpath:
root = 'unicode1_leadership_value.'
else:
root = ''
api.option(root + 'options.unicode.unicode').value.set([u'val3', u'val4'])
api.option(root + 'options.unicode.unicode1', 0).value.set(u'super1')
api.option(root + 'options.unicode.unicode1', 1).value.set(u'super2')
api.option(root + 'options.unicode.unicode2', 0).value.set(u'pas test')
api.option(root + 'options.unicode.unicode2', 1).value.set(u'test')
api.option(root + 'options.unicode.unicode3', 1).value.set(u'super')

View file

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

View file

@ -0,0 +1,11 @@
{"updates": ["options.unicode.unicode",
"options.unicode.unicode1",
"options.unicode.unicode2",
"options.unicode.unicode3"],
"model": {"options.unicode.unicode": {"required": true,
"value": ["val3"],
"owner": "user"},
"options.unicode.unicode1": {"0": {"value": "super1",
"owner": "user"}},
"options.unicode.unicode2": {"0": {"value": "pas test",
"owner": "user"}}}}

View file

@ -0,0 +1,17 @@
{"updates": ["options.unicode.unicode",
"options.unicode.unicode2"],
"model": {"options.unicode.unicode": {"required": true,
"value": ["val3", "val4", "val5"],
"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",
"owner": "default"}},
"options.unicode.unicode3": {"1": {"value": "super",
"owner": "user"}}}}

View file

@ -0,0 +1,16 @@
{"model": {"options.unicode.unicode": {"owner": "user",
"required": true,
"value": ["val3", "val4", "val5"]},
"options.unicode.unicode1": {"0": {"owner": "user",
"value": "super1"},
"1": {"owner": "user",
"value": "super2"}},
"options.unicode.unicode2": {"0": {"owner": "user",
"value": "pas test"},
"1": {"owner": "user",
"value": "test"},
"2": {"owner": "default",
"value": "follower2"}},
"options.unicode.unicode3": {"1": {"owner": "user",
"value": "super"}}},
"updates": ["options.unicode.unicode", "options.unicode.unicode2"]}

Some files were not shown because too many files have changed in this diff Show more