extensions-website/extensions/tests
Anna Sirota b0bb4905b2 Reuse files as previews, icons or featured images (#161)
Now it should be be possible to:

* upload the same image as a preview or featured image on different extensions;
* upload the same image as an icon on different extensions;
* select the same video/image multiple times while adding previews on Draft or Edit page: first one will be saved, the rest of the duplicates will be ignored.

If all extensions referencing the file in any way are deleted, the file remains in the database: no thumbnail generating or scanning will happen if/when the file gets re-uploaded as a preview or featured image.

In all cases of re-upload `File.user` will not change: this shouldn't be a problem because currently there's no code relying on image ownership.

Version files will remain the only exception from this changed behaviour: it will only be possible to re-upload a version file once the version itself is deleted (which also deletes its file).

As a consequence of this change `File.extension_id` is dropped, because it is no longer possible to choose which extension should be saved there.

Should take care of #157

Reviewed-on: #161
Reviewed-by: Oleg-Komarov <oleg-komarov@noreply.localhost>
2024-06-04 12:23:25 +02:00
..
files Support for platforms and wheels (#131) 2024-05-16 18:20:41 +02:00
__init__.py Initial models, tests and other boilerplate 2022-08-25 17:37:48 +02:00
test_api.py Account: show Blender ID username instead of full name everywhere (closes #59) 2024-05-30 13:00:30 +02:00
test_approve.py Tests: extension.approve and its interaction with latest_version 2024-05-27 12:44:16 +02:00
test_delete.py Reuse files as previews, icons or featured images (#161) 2024-06-04 12:23:25 +02:00
test_manifest.py Reuse files as previews, icons or featured images (#161) 2024-06-04 12:23:25 +02:00
test_models.py Mass rename INCOMPLETE -> DRAFT 2024-05-23 18:26:20 +02:00
test_submit.py Reuse files as previews, icons or featured images (#161) 2024-06-04 12:23:25 +02:00
test_update.py Reuse files as previews, icons or featured images (#161) 2024-06-04 12:23:25 +02:00
test_utils.py Manifest Validation: tags 2024-02-20 16:15:33 +01:00
test_views.py API: accept unknown values for platform filter (#155) 2024-05-28 15:59:36 +02:00