adapt tests to new dotenv environment

DB tests now can simply set the environment to change configuration
variables. API tests still rely on a configuration file.

Also, query.php needs to set up the CONST_* variables to work with
the query scripts. That is a tiny bit messy and duplicates code
but this part will need to be reworked later.
This commit is contained in:
Sarah Hoffmann
2020-12-17 11:46:01 +01:00
parent 06d89e1d47
commit d97aed8741
4 changed files with 40 additions and 11 deletions

View File

@@ -282,6 +282,7 @@ def query_cmd(context, query, dups):
(outp, err) = proc.communicate()
assert_equals (0, proc.returncode, "query.php failed with message: %s\noutput: %s" % (err, outp))
logger.debug("run_nominatim_script: %s\n%s\n" % (cmd, outp.decode('utf-8').replace('\\n', '\n')))
context.response = SearchResponse(outp.decode('utf-8'), 'json')