Example #1
0
def test_user_limits_render():
    user_limits = colors.UserLimits()
    user_limits.render({"low": -1, "high": 1})
    assert user_limits.inputs["low"].value == "-1"
    assert user_limits.inputs["high"].value == "1"
Example #2
0
def test_user_limits_on_fixed(listener, new, action):
    user_limits = colors.UserLimits()
    user_limits.subscribe(listener)
    user_limits.on_checkbox_change(None, None, new)
    listener.assert_called_once_with(action)
Example #3
0
def test_user_limits_render_checkboxes(key, props, active):
    user_limits = colors.UserLimits()
    user_limits.render(props)
    assert user_limits.checkboxes[key].active == active