-BASE_SERVER_ENV = {
- 'HTTP_HOST' : 'localhost',
- 'HTTP_USER_AGENT' : 'Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0',
- 'HTTP_ACCEPT' : 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING' : 'gzip, deflate',
- 'HTTP_CONNECTION' : 'keep-alive',
- 'SERVER_SIGNATURE' : '<address>Nominatim BDD Tests</address>',
- 'SERVER_SOFTWARE' : 'Nominatim test',
- 'SERVER_NAME' : 'localhost',
- 'SERVER_ADDR' : '127.0.1.1',
- 'SERVER_PORT' : '80',
- 'REMOTE_ADDR' : '127.0.0.1',
- 'DOCUMENT_ROOT' : '/var/www',
- 'REQUEST_SCHEME' : 'http',
- 'CONTEXT_PREFIX' : '/',
- 'SERVER_ADMIN' : 'webmaster@localhost',
- 'REMOTE_PORT' : '49319',
- 'GATEWAY_INTERFACE' : 'CGI/1.1',
- 'SERVER_PROTOCOL' : 'HTTP/1.1',
- 'REQUEST_METHOD' : 'GET',
- 'REDIRECT_STATUS' : 'CGI'
-}
+
+def make_todo_list(context, result_id):
+ if result_id is None:
+ context.execute_steps("then at least 1 result is returned")
+ return range(len(context.response.result))
+
+ context.execute_steps(f"then more than {result_id}results are returned")
+ return (int(result_id.strip()), )