Merge pull request '284_285_API_changes' (#296) from 284_285_API_changes into master

Reviewed-on: SGD-Nord/konova#296
This commit is contained in:
2023-02-23 10:20:56 +01:00
2 changed files with 38 additions and 33 deletions

View File

@@ -9,7 +9,7 @@ from django.contrib.gis.db.models.functions import Translate
from konova.models import Geometry, GeometryConflict
from konova.tests.test_views import BaseTestCase
from konova.utils.wfs.spatial import ParcelWFSFetcher
from konova.utils.schneider.fetcher import ParcelFetcher
class GeometryTestCase(BaseTestCase):
@@ -63,18 +63,14 @@ class GeometryTestCase(BaseTestCase):
num_conflict = GeometryConflict.objects.all().count()
self.assertEqual(0, num_conflict)
def test_wfs_fetch(self):
""" Tests the fetching functionality of ParcelWFSFetcher
def test_fetch(self):
""" Tests the fetching functionality of ParcelFetcher
+++ Test relies on the availability of the RLP Flurstück WFS +++
+++ Test relies on the availability of the spatial computation component 'Schneider' +++
Returns:
"""
fetcher = ParcelWFSFetcher(
geometry_id=self.geom_1.id,
)
features = fetcher.get_features(
"ave:Flurstueck",
)
self.assertNotEqual(0, len(features), msg="Spatial wfs get feature did not work!")
fetcher = ParcelFetcher(geometry=self.geom_1)
features = fetcher.get_parcels()
self.assertNotEqual(0, len(features), msg="Spatial fetcher get feature did not work!")