X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/b90e719da595b6760b39b7cd64ee29447de2d5e8..7617a9316ed9e541819b5a1700a07aa4d9637583:/test/python/cli/test_cli.py diff --git a/test/python/cli/test_cli.py b/test/python/cli/test_cli.py index 7bc3fc09..dbe17083 100644 --- a/test/python/cli/test_cli.py +++ b/test/python/cli/test_cli.py @@ -24,26 +24,6 @@ import nominatim.tools.refresh import nominatim.tools.postcodes import nominatim.tokenizer.factory -from mocks import MockParamCapture - -@pytest.fixture -def mock_run_legacy(monkeypatch): - mock = MockParamCapture() - monkeypatch.setattr(nominatim.cli, 'run_legacy_script', mock) - return mock - - -@pytest.fixture -def mock_func_factory(monkeypatch): - def get_mock(module, func): - mock = MockParamCapture() - mock.func_name = func - monkeypatch.setattr(module, func, mock) - return mock - - return get_mock - - class TestCli: @@ -113,9 +93,12 @@ class TestCli: assert func.called == 1 -@pytest.mark.parametrize("params", [('search', '--query', 'new'), - ('reverse', '--lat', '0', '--lon', '0'), - ('lookup', '--id', 'N1'), +@pytest.mark.parametrize("params", [('search', '--query', 'new', '--polygon-output', 'svg', '--polygon-threshold', '0.1'), + ('search', '--city', 'Berlin', '--format', 'xml', '--lang', 'de'), + ('reverse', '--lat', '0', '--lon', '0', + '--polygon-output', 'svg', '--polygon-threshold', '0.1', '--format', 'json', '--lang', 'en'), + ('lookup', '--id', 'N1', + '--polygon-output', 'svg', '--polygon-threshold', '0.1', '--format', 'json', '--lang', 'en'), ('details', '--node', '1'), ('details', '--way', '1'), ('details', '--relation', '1'),