]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/bdd/steps/nominatim_environment.py
Merge pull request #2957 from lonvia/reorganise-api-module
[nominatim.git] / test / bdd / steps / nominatim_environment.py
index 158b7974dfcf7c96389235563bccf97bb4d2c657..e156c60c37aef808fccf0ab1165c10b1b35f481b 100644 (file)
@@ -9,9 +9,6 @@ import importlib
 import sys
 import tempfile
 
-from asgi_lifespan import LifespanManager
-import httpx
-
 import psycopg2
 import psycopg2.extras
 
@@ -337,6 +334,8 @@ class NominatimEnvironment:
 
     def create_api_request_func_starlette(self):
         import nominatim.server.starlette.server
+        from asgi_lifespan import LifespanManager
+        import httpx
 
         async def _request(endpoint, params, project_dir, environ):
             app = nominatim.server.starlette.server.get_application(project_dir, environ)