From 897d4f22f416939c31b18b4c7a48f68f2c344039 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Thu, 13 Jun 2024 20:52:28 +0200 Subject: [PATCH] chore(tests): make sure we send a valid geojson when data is empty --- umap/tests/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/umap/tests/base.py b/umap/tests/base.py index e1abba32..9491dada 100644 --- a/umap/tests/base.py +++ b/umap/tests/base.py @@ -127,6 +127,8 @@ class DataLayerFactory(factory.django.DjangoModelFactory): data.setdefault("_umap_options", {}) kwargs["settings"]["name"] = kwargs["name"] data["_umap_options"]["name"] = kwargs["name"] + data.setdefault("type", "FeatureCollection") + data.setdefault("features", []) kwargs["geojson"] = ContentFile(json.dumps(data), "foo.json") return kwargs