-@pytest.mark.parametrize("command,params", [
- ('wiki-data', ('setup.php', '--import-wikipedia-articles')),
- ('importance', ('update.php', '--recompute-importance')),
- ])
-def test_refresh_legacy_command(mock_func_factory, temp_db, command, params):
- mock_run_legacy = mock_func_factory(nominatim.clicmd.refresh, 'run_legacy_script')
-
- assert 0 == call_nominatim('refresh', '--' + command)
-
- assert mock_run_legacy.called == 1
- assert len(mock_run_legacy.last_args) >= len(params)
- assert mock_run_legacy.last_args[:len(params)] == params
-