Esempio n. 1
0
def test_single_option_returns_single_value():
    # WAT?!
    widget = OptionWidget().createWidget()
    option = OptionWidget(widget=widget)
    option.initWidget(widget)
    option.config = config
    option.setvalue("1")
    assert option.value() == "1"
Esempio n. 2
0
def test_single_option_returns_single_value():
    # WAT?!
    widget = OptionWidget().createWidget()
    option = OptionWidget(widget=widget)
    option.initWidget(widget, {})
    option.config = config
    option.setvalue("1")
    assert option.value() == "1"
Esempio n. 3
0
def test_multi_returns_list():
    # WAT?!
    widget = OptionWidget().createWidget()
    option = OptionWidget(widget=widget)
    option.initWidget(widget)
    config['multi'] = True
    option.config = config
    option.setvalue("1;2")
    assert option.value() == "1;2"
Esempio n. 4
0
def test_multi_returns_list():
    # WAT?!
    widget = OptionWidget().createWidget()
    option = OptionWidget(widget=widget)
    option.initWidget(widget, {})
    config['multi'] = True
    option.config = config
    option.setvalue("1;2")
    assert option.value() == "1;2"