Exemplo n.º 1
0
def test_should_return_uncheckedvalue_on_false():
    checkbox = QCheckBox()
    widget = CheckboxWidget(widget=checkbox)
    widget.config = config
    widget.setvalue('MyFalse')
    assert checkbox.isChecked() == False
    assert widget.value() == 'MyFalse'
Exemplo n.º 2
0
def test_should_set_config_checkedvalue_on_true():
    checkbox = QCheckBox()
    assert not checkbox.isChecked()
    widget = CheckboxWidget(widget=checkbox)
    widget.config = config
    widget.setvalue('MyTrue')
    assert checkbox.isChecked()
Exemplo n.º 3
0
def test_should_set_config_checkedvalue_on_true():
    checkbox = QCheckBox()
    assert not checkbox.isChecked()
    widget = CheckboxWidget(widget=checkbox)
    widget.config = config
    widget.setvalue('MyTrue')
    assert checkbox.isChecked()
Exemplo n.º 4
0
def test_should_return_uncheckedvalue_on_false():
    checkbox = QCheckBox()
    widget = CheckboxWidget(widget=checkbox)
    widget.config = config
    widget.setvalue('MyFalse')
    assert checkbox.isChecked() == False
    assert widget.value() == 'MyFalse'
Exemplo n.º 5
0
def test_should_set_config_uncheckedvalue_on_false():
    checkbox = QCheckBox()
    checkbox.setChecked(True)
    assert checkbox.isChecked()
    widget = CheckboxWidget(widget=checkbox)
    widget.config = config
    widget.setvalue('MyFalse')
    assert not checkbox.isChecked()
Exemplo n.º 6
0
def test_should_set_config_uncheckedvalue_on_false():
    checkbox = QCheckBox()
    checkbox.setChecked(True)
    assert checkbox.isChecked()
    widget = CheckboxWidget(widget=checkbox)
    widget.config = config
    widget.setvalue('MyFalse')
    assert not checkbox.isChecked()