mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-25 14:02:12 +03:00
reorganization of folder/file for the special phrases importer
This commit is contained in:
parent
6812f397af
commit
1b68152fb2
@ -2,7 +2,7 @@
|
||||
Implementation of the 'special-phrases' command.
|
||||
"""
|
||||
import logging
|
||||
from nominatim.tools.special_phrases import SpecialPhrasesImporter
|
||||
from nominatim.tools import SpecialPhrasesImporter
|
||||
from nominatim.db.connection import connect
|
||||
|
||||
LOG = logging.getLogger()
|
||||
|
@ -2,3 +2,5 @@
|
||||
Module with functions for importing, updating Nominatim databases
|
||||
as well as general maintenance helpers.
|
||||
"""
|
||||
|
||||
from nominatim.tools.special_phrases.special_phrases_importer import SpecialPhrasesImporter
|
||||
|
@ -2,13 +2,12 @@
|
||||
Tests for import special phrases methods
|
||||
of the class SpecialPhrasesImporter.
|
||||
"""
|
||||
from mocks import MockParamCapture
|
||||
from nominatim.errors import UsageError
|
||||
from pathlib import Path
|
||||
import tempfile
|
||||
from shutil import copyfile
|
||||
import pytest
|
||||
from nominatim.tools.special_phrases import SpecialPhrasesImporter
|
||||
from nominatim.tools import SpecialPhrasesImporter
|
||||
|
||||
TEST_BASE_DIR = Path(__file__) / '..' / '..'
|
||||
|
||||
@ -304,7 +303,7 @@ def test_import_from_wiki(monkeypatch, temp_db_conn, def_config, special_phrases
|
||||
CREATE TABLE place_classtype_amenity_animal_shelter();
|
||||
CREATE TABLE place_classtype_wrongclass_wrongtype();""")
|
||||
|
||||
monkeypatch.setattr('nominatim.tools.special_phrases.SpecialPhrasesImporter._get_wiki_content', mock_get_wiki_content)
|
||||
monkeypatch.setattr('nominatim.tools.SpecialPhrasesImporter._get_wiki_content', mock_get_wiki_content)
|
||||
special_phrases_importer.import_from_wiki(['en'])
|
||||
|
||||
class_test = 'aerialway'
|
||||
|
Loading…
Reference in New Issue
Block a user