From ffe7f18af1f80b164eb8b24617b27d3d67a4fef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Mon, 26 Feb 2024 15:00:56 +0100 Subject: [PATCH] chore: enhance naming in tests --- umap/tests/test_datalayer_views.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/umap/tests/test_datalayer_views.py b/umap/tests/test_datalayer_views.py index d3a1125d..1ae87b8f 100644 --- a/umap/tests/test_datalayer_views.py +++ b/umap/tests/test_datalayer_views.py @@ -240,14 +240,16 @@ def test_versions_can_return_old_format(client, datalayer, map, settings): ) # store with the id prefix (rather than the uuid) - old_format_version = "%s/%s_1440918637.geojson" % (root, datalayer.id) - datalayer.geojson.storage.save(old_format_version, ContentFile("{}")) + old_format_version = "%s_1440918637.geojson" % datalayer.id + datalayer.geojson.storage.save( + ("%s/" % root) + old_format_version, ContentFile("{}") + ) url = reverse("datalayer_versions", args=(map.pk, datalayer.pk)) versions = json.loads(client.get(url).content.decode()) assert len(versions["versions"]) == 4 version = { - "name": "%s_1440918637.geojson" % datalayer.id, + "name": old_format_version, "size": 2, "at": "1440918637", }