Fix typo in tests
This commit is contained in:
parent
e13f3ac235
commit
dfd04c33b0
1 changed files with 4 additions and 2 deletions
|
@ -107,11 +107,13 @@ class DataLayerFactory(factory.django.DjangoModelFactory):
|
||||||
|
|
||||||
@factory.post_generation
|
@factory.post_generation
|
||||||
def geojson_data(obj, create, extracted, **kwargs):
|
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()
|
data = DATALAYER_DATA.copy()
|
||||||
obj.settings["name"] = obj.name
|
obj.settings["name"] = obj.name
|
||||||
data["_umap_options"] = obj.settings
|
data["_umap_options"] = obj.settings
|
||||||
with open(obj.geojson.path, mode="w") as truc:
|
with open(obj.geojson.path, mode="w") as f:
|
||||||
truc.write(json.dumps(data))
|
f.write(json.dumps(data))
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = DataLayer
|
model = DataLayer
|
||||||
|
|
Loading…
Reference in a new issue