#23251: Use a temporary folder to store uploaded files during tests
-------------------------------------+-------------------------------------
Reporter: Shai Berger | Owner: Bhavya
| Peshavaria
Type: Bug | Status: assigned
Component: Testing framework | Version: dev
Severity: Normal | Resolution:
Keywords: file storage upload | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mariusz Felisiak):
Replying to [comment:18 Shai Berger]:
> In the years since this ticket was first filed, cloud services have
become even more pervasive and important than they were. IMO, this means
that the `TEST_MEDIA_ROOT` approach is inferior to a `TEST_FILE_STORAGE`,
where the whole default storage is replaced for tests. That would allow
users to choose if the media in their tests are saved to memory (as
suggested in comment:5), to a different bucket in their cloud object
storage, or to a local file. Of course, if a user explicitly creates their
own storage in code, there's little Django can do as a framework.
Agreed, we should first resolved #26029
([https://github.com/django/django/pull/15610 PR]) to add `STORAGES`, then
we can add support for the new `test` key.
--
Ticket URL: <https://code.djangoproject.com/ticket/23251#comment:19>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701820f910472-e2a2d24c-3249-49f3-a915-17b2c893f5c8-000000%40eu-central-1.amazonses.com.