X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/02894ca4a40a73f715652cef062fd54e512039ed..2bd6c761b0e573189a03e8819c6db715eb711eb1:/test/python/tokenizer/sanitizers/test_sanitizer_config.py?ds=inline diff --git a/test/python/tokenizer/sanitizers/test_sanitizer_config.py b/test/python/tokenizer/sanitizers/test_sanitizer_config.py index 02794776..0dbbc7a0 100644 --- a/test/python/tokenizer/sanitizers/test_sanitizer_config.py +++ b/test/python/tokenizer/sanitizers/test_sanitizer_config.py @@ -82,32 +82,32 @@ def test_create_split_regex_empty_delimiter(): def test_create_kind_filter_no_params(inp): filt = SanitizerConfig().get_filter_kind() - assert filt(PlaceName('something', inp, '')) + assert filt(inp) @pytest.mark.parametrize('kind', ('de', 'name:de', 'ende')) def test_create_kind_filter_custom_regex_positive(kind): filt = SanitizerConfig({'filter-kind': '.*de'}).get_filter_kind() - assert filt(PlaceName('something', kind, '')) + assert filt(kind) @pytest.mark.parametrize('kind', ('de ', '123', '', 'bedece')) def test_create_kind_filter_custom_regex_negative(kind): filt = SanitizerConfig({'filter-kind': '.*de'}).get_filter_kind() - assert not filt(PlaceName('something', kind, '')) + assert not filt(kind) @pytest.mark.parametrize('kind', ('name', 'fr', 'name:fr', 'frfr', '34')) def test_create_kind_filter_many_positive(kind): filt = SanitizerConfig({'filter-kind': ['.*fr', 'name', r'\d+']}).get_filter_kind() - assert filt(PlaceName('something', kind, '')) + assert filt(kind) @pytest.mark.parametrize('kind', ('name:de', 'fridge', 'a34', '.*', '\\')) def test_create_kind_filter_many_negative(kind): filt = SanitizerConfig({'filter-kind': ['.*fr', 'name', r'\d+']}).get_filter_kind() - assert not filt(PlaceName('something', kind, '')) + assert not filt(kind)