X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/c3788d765ed4e7ddf00794085af757714bc102cf..2bab0ca060ff224091b20a0ac808a3febaba04b1:/test/python/tools/test_refresh_setup_website.py?ds=sidebyside diff --git a/test/python/tools/test_refresh_setup_website.py b/test/python/tools/test_refresh_setup_website.py index af3804c9..fe29dd52 100644 --- a/test/python/tools/test_refresh_setup_website.py +++ b/test/python/tools/test_refresh_setup_website.py @@ -1,8 +1,8 @@ -# SPDX-License-Identifier: GPL-2.0-only +# SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of Nominatim. (https://nominatim.org) # -# Copyright (C) 2022 by the Nominatim developer community. +# Copyright (C) 2024 by the Nominatim developer community. # For a full list of authors see the git log. """ Tests for setting up the website scripts. @@ -11,7 +11,7 @@ import subprocess import pytest -from nominatim.tools import refresh +from nominatim_db.tools import refresh @pytest.fixture def test_script(tmp_path): @@ -95,3 +95,10 @@ def test_relative_log_file(project_env, monkeypatch, test_script, run_website_sc assert run_website_script() == 10 +def test_variable_with_bracket(project_env, monkeypatch, test_script, run_website_script): + monkeypatch.setenv('NOMINATIM_DATABASE_DSN', 'pgsql:dbname=nominatim;user=foo;password=4{5') + + test_script('exit(CONST_Database_DSN === "pgsql:dbname=nominatim;user=foo;password=4{5" ? 10 : 20);') + + assert run_website_script() == 10 +