chore: enhance naming in tests

This commit is contained in:
Alexis Métaireau 2024-02-26 15:00:56 +01:00
parent 51889f3238
commit ffe7f18af1

View file

@ -240,14 +240,16 @@ def test_versions_can_return_old_format(client, datalayer, map, settings):
) )
# store with the id prefix (rather than the uuid) # store with the id prefix (rather than the uuid)
old_format_version = "%s/%s_1440918637.geojson" % (root, datalayer.id) old_format_version = "%s_1440918637.geojson" % datalayer.id
datalayer.geojson.storage.save(old_format_version, ContentFile("{}")) datalayer.geojson.storage.save(
("%s/" % root) + old_format_version, ContentFile("{}")
)
url = reverse("datalayer_versions", args=(map.pk, datalayer.pk)) url = reverse("datalayer_versions", args=(map.pk, datalayer.pk))
versions = json.loads(client.get(url).content.decode()) versions = json.loads(client.get(url).content.decode())
assert len(versions["versions"]) == 4 assert len(versions["versions"]) == 4
version = { version = {
"name": "%s_1440918637.geojson" % datalayer.id, "name": old_format_version,
"size": 2, "size": 2,
"at": "1440918637", "at": "1440918637",
} }