X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/1c6f4263635dce309434dc10e622552b1e70308b..5bf55a69a5f9ede8b4e673732f1150a81ca2de86:/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 7299988b..11dede30 100644 --- a/test/bdd/steps/nominatim_environment.py +++ b/test/bdd/steps/nominatim_environment.py @@ -86,7 +86,10 @@ class NominatimEnvironment: be picked up by dotenv and creates a project directory with the appropriate website scripts. """ - dsn = 'pgsql:dbname={}'.format(dbname) + if dbname.startswith('sqlite:'): + dsn = 'sqlite:dbname={}'.format(dbname[7:]) + else: + dsn = 'pgsql:dbname={}'.format(dbname) if self.db_host: dsn += ';host=' + self.db_host if self.db_port: @@ -197,6 +200,9 @@ class NominatimEnvironment: """ self.write_nominatim_config(self.api_test_db) + if self.api_test_db.startswith('sqlite:'): + return + if not self.api_db_done: self.api_db_done = True