Ejemplo n.º 1
0
def test_process_log_regexps_invalid():
    with pytest.raises(config.ConfigError):
        config._process_log_regexps({}, 'test', {'foo': object()})
    with pytest.raises(config.ConfigError):
        config._process_log_regexps({'regex': 'bar'}, 'foo', {'foo': object()})
Ejemplo n.º 2
0
def test_process_log_regexps_invalid():
    with pytest.raises(config.ConfigError):
        config._process_log_regexps({}, 'test', {'foo': object()})
    with pytest.raises(config.ConfigError):
        config._process_log_regexps({'regex': 'bar'}, 'foo', {'foo': object()})
Ejemplo n.º 3
0
def test_process_log_regexps(data, name, expected):
    available = {'foo': object(), 'bar': object()}
    assert config._process_log_regexps(data, name, available) == expected
Ejemplo n.º 4
0
def test_process_log_regexps(data, name, expected):
    available = {'foo': object(), 'bar': object()}
    assert config._process_log_regexps(data, name, available) == expected