# SPDX-License-Identifier: GPL-2.0-only # # This file is part of Nominatim. (https://nominatim.org) # # Copyright (C) 2022 by the Nominatim developer community. # For a full list of authors see the git log. """ Tests for setting up the website scripts. """ import subprocess import pytest from nominatim.tools import refresh @pytest.fixture def test_script(tmp_path): (tmp_path / 'php').mkdir() website_dir = (tmp_path / 'php' / 'website') website_dir.mkdir() def _create_file(code): outfile = website_dir / 'reverse-only-search.php' outfile.write_text('