mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
125 stars 41 forks source link

Fix file_factory to create File objects that are `is_signed` when approved #7419

Closed eviljeff closed 2 years ago

eviljeff commented 4 years ago

The file_factory test function, that is in turn used by version_factory and addon_factory, creates File objects that are by default STATUS_APPROVED but not is_signed like a "normal" approved File instance would be; and not is_webextension even though we've not accepted new legacy addon uploads in more than a year. We should look into changing these defaults.

caveats/footguns:

Could be split into two issues.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.

eviljeff commented 3 years ago

This will be a lot simpler once mozilla/addons#8499 drops is_webextension from the File model (maybe even wontfix/dupe)

eviljeff commented 2 years ago

rewording to just focus on is_signed because mozilla/addons#8499 will drop is_webextension entirely.

eviljeff commented 2 years ago

WONTFIX'ing this. is_signed is only checked in a few places (blocklist code; exposed in signing serializer; shown in admin) and we can just make sure the field is set for those tests.