""" Tests for setting up the website scripts. """ from pathlib import Path import subprocess import pytest from nominatim.tools import refresh @pytest.fixture def envdir(tmpdir): (tmpdir / 'php').mkdir() (tmpdir / 'php' / 'website').mkdir() return tmpdir @pytest.fixture def test_script(envdir): def _create_file(code): outfile = envdir / 'php' / 'website' / 'reverse-only-search.php' outfile.write_text('