X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/5617bffe2fcf527365bcd801304180e1cc07cb98..62eedbb8f6ddb7928022d799a1b1fea62844faf8:/test/python/tokenizer/sanitizers/test_sanitizer_config.py 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)