EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit 91ecbd99 authored by Fabian Schindler's avatar Fabian Schindler
Browse files

Improved testability: making eoxserver import within function

parent 1c69e2f0
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,6 @@ from datetime import datetime
import importlib
from osgeo.osr import SpatialReference, CoordinateTransformation
from eoxserver.contrib.gdal import open_with_env, get_extent
from django.contrib.gis.geos import Polygon, GEOSGeometry
......@@ -58,6 +57,8 @@ def extract_footprint(env: dict, vsipath: str) -> str:
str: WKT formatted footprint
"""
from eoxserver.contrib.gdal import open_with_env, get_extent
f = open_with_env(vsipath, env)
try:
geojson_footprint = f.GetMetadata()["geometry"]
......
pytest
pytest-cov
pytest-mock
pygdal
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment