X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/94fa7162be678dc74c1a5516e22916122ba66bbb..7dfe645b5f2fcfc320264baad73f52c8003e857f:/test/python/test_tools_exec_utils.py diff --git a/test/python/test_tools_exec_utils.py b/test/python/test_tools_exec_utils.py index a4eef61f..ef1b46e2 100644 --- a/test/python/test_tools_exec_utils.py +++ b/test/python/test_tools_exec_utils.py @@ -63,8 +63,8 @@ def test_run_legacy_return_dont_throw_on_success(nominatim_env, test_script): assert 0 == exec_utils.run_legacy_script(fname, nominatim_env=nominatim_env, throw_on_fail=True) -def test_run_legacy_use_given__module_path(nominatim_env, test_script): - fname = test_script("exit($_SERVER['NOMINATIM_DATABASE_MODULE_PATH'] == 'module' ? 0 : 23);") +def test_run_legacy_use_given_module_path(nominatim_env, test_script): + fname = test_script("exit($_SERVER['NOMINATIM_DATABASE_MODULE_PATH'] == '' ? 0 : 23);") assert 0 == exec_utils.run_legacy_script(fname, nominatim_env=nominatim_env) @@ -99,3 +99,12 @@ def test_run_api_with_extra_env(tmp_project_dir): extra_env = dict(SCRIPT_FILENAME=str(tmp_project_dir / 'website' / 'test.php')) assert 0 == exec_utils.run_api_script('badname', tmp_project_dir, extra_env=extra_env) + + +### run_osm2pgsql + +def test_run_osm2pgsql(): + exec_utils.run_osm2pgsql(dict(osm2pgsql='echo', append=False, flatnode_file=None, + dsn='dbname=foobar', threads=1, osm2pgsql_cache=500, + osm2pgsql_style='./my.style', + import_file='foo.bar'))