Exemple #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()}
Exemple #2
0
def test_re_parameter_error(raw, config):
    with pytest.raises(InterfaceTypeError):
        assert REParameter(**config).clean(raw)
Exemple #3
0
def test_re_parameter(raw, config, expected):
    assert REParameter(**config).clean(raw) == expected
Exemple #4
0
def test_re_parameter():
    assert REParameter().clean(".+?") == ".+?"
    with pytest.raises(InterfaceTypeError):
        assert REParameter().clean("+")