X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/a4d7cdd2ad7b1e087751e55a56454781aa6580bc..7ba5152493327d277115aab9b344b652decd3f2e:/test/bdd/steps/nominatim_environment.py?ds=sidebyside diff --git a/test/bdd/steps/nominatim_environment.py b/test/bdd/steps/nominatim_environment.py index c4b05588..9836865c 100644 --- a/test/bdd/steps/nominatim_environment.py +++ b/test/bdd/steps/nominatim_environment.py @@ -44,11 +44,9 @@ class NominatimEnvironment: self.api_db_done = False self.website_dir = None - self.api_engine = None - if config['API_ENGINE'] != 'php': - if not hasattr(self, f"create_api_request_func_{config['API_ENGINE']}"): - raise RuntimeError(f"Unknown API engine '{config['API_ENGINE']}'") - self.api_engine = getattr(self, f"create_api_request_func_{config['API_ENGINE']}")() + if not hasattr(self, f"create_api_request_func_{config['API_ENGINE']}"): + raise RuntimeError(f"Unknown API engine '{config['API_ENGINE']}'") + self.api_engine = getattr(self, f"create_api_request_func_{config['API_ENGINE']}")() if self.tokenizer == 'legacy' and self.server_module_path is None: raise RuntimeError("You must set -DSERVER_MODULE_PATH when testing the legacy tokenizer.") @@ -110,15 +108,6 @@ class NominatimEnvironment: self.website_dir = tempfile.TemporaryDirectory() - try: - conn = self.connect_database(dbname) - except: - conn = False - refresh.setup_website(Path(self.website_dir.name) / 'website', - self.get_test_config(), conn) - if conn: - conn.close() - def get_test_config(self): cfg = Configuration(Path(self.website_dir.name), environ=self.test_env)