From dfd04c33b0b1ddd3b941d9a6c02e14e076d86b1a Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Wed, 20 Sep 2023 09:46:05 +0200 Subject: [PATCH] Fix typo in tests --- umap/tests/base.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/umap/tests/base.py b/umap/tests/base.py index d3f160da..bc75c19e 100644 --- a/umap/tests/base.py +++ b/umap/tests/base.py @@ -107,11 +107,13 @@ class DataLayerFactory(factory.django.DjangoModelFactory): @factory.post_generation def geojson_data(obj, create, extracted, **kwargs): + # Make sure DB settings and file settings are aligned. + # At some point, file settings should be removed, but we are not there yet. data = DATALAYER_DATA.copy() obj.settings["name"] = obj.name data["_umap_options"] = obj.settings - with open(obj.geojson.path, mode="w") as truc: - truc.write(json.dumps(data)) + with open(obj.geojson.path, mode="w") as f: + f.write(json.dumps(data)) class Meta: model = DataLayer