Ejemplo n.º 1
0
class IgnoreEventRuleApplication(ExtModelApplication):
    """
    IgnoreEventRule application
    """
    title = _("Ignore Event Rules")
    menu = [_("Setup"), _("Ignore Event Rules")]
    model = IgnoreEventRules

    clean_fields = {"left_re": REParameter(), "right_re": REParameter()}
Ejemplo n.º 2
0
def test_re_parameter_error(raw, config):
    with pytest.raises(InterfaceTypeError):
        assert REParameter(**config).clean(raw)
Ejemplo n.º 3
0
def test_re_parameter(raw, config, expected):
    assert REParameter(**config).clean(raw) == expected
Ejemplo n.º 4
0
def test_re_parameter():
    assert REParameter().clean(".+?") == ".+?"
    with pytest.raises(InterfaceTypeError):
        assert REParameter().clean("+")