Refactoring loading of external special phrases and importation process by introducing SPLoader and SPWikiLoader

This commit is contained in:
AntoJvlt
2021-05-10 21:48:11 +02:00
parent 40cb17d299
commit 00959fac57
9 changed files with 226 additions and 190 deletions

View File

@@ -256,7 +256,7 @@ def test_index_command(mock_func_factory, temp_db_cursor, tokenizer_mock,
assert rank_mock.called == do_ranks
def test_special_phrases_command(temp_db, mock_func_factory, tokenizer_mock):
func = mock_func_factory(nominatim.clicmd.special_phrases.SpecialPhrasesImporter, 'import_from_wiki')
func = mock_func_factory(nominatim.clicmd.special_phrases.SPImporter, 'import_from_wiki')
call_nominatim('special-phrases', '--import-from-wiki')