]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/bdd/steps/nominatim_environment.py
bdd tests: directly call python code for setup-website
[nominatim.git] / test / bdd / steps / nominatim_environment.py
index 0edb115980bd564ddac04a8b2070fb73d505e1de..811faf5cda6a9837a597feeb8a4afd4ebc548912 100644 (file)
@@ -8,6 +8,7 @@ import psycopg2.extras
 sys.path.insert(1, str((Path(__file__) / '..' / '..' / '..' / '..').resolve()))
 
 from nominatim.config import Configuration
+from nominatim.tools import refresh
 from steps.utils import run_script
 
 class NominatimEnvironment:
@@ -104,7 +105,8 @@ class NominatimEnvironment:
             self.website_dir.cleanup()
 
         self.website_dir = tempfile.TemporaryDirectory()
-        self.run_setup_script('setup-website')
+        cfg = Configuration(None, self.src_dir / 'settings', environ=self.test_env)
+        refresh.setup_website(Path(self.website_dir.name) / 'website', self.src_dir / 'lib-php', cfg)
 
 
     def db_drop_database(self, name):