-# 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.
import pytest
-from nominatim.tools import refresh
+from nominatim_db.tools import refresh
@pytest.fixture
def test_script(tmp_path):
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
+