mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 11:52:38 +02:00
chore(tests): make sure we send a valid geojson when data is empty
This commit is contained in:
parent
b863beaec9
commit
897d4f22f4
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue