summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorFrancesco Panico <panico.francesco@gmail.com>2022-11-11 07:17:49 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-10 10:56:59 +0100
commit72efd840a8cb6ee35a3732d8bb434e7361970b3c (patch)
tree8379ee124d0c278b593b3dc2487ab8e44ad64c30 /docs/topics
parent04fdf719331dde6b0f4e7cdc445be4d4278f3ec4 (diff)
downloaddjango-72efd840a8cb6ee35a3732d8bb434e7361970b3c.tar.gz
Fixed #34110 -- Added in-memory file storage.
Thanks Paolo Melchiorre, Carlton Gibson, and Mariusz Felisiak for reviews.
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/testing/overview.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/topics/testing/overview.txt b/docs/topics/testing/overview.txt
index 750ecb5dc2..e37cf23737 100644
--- a/docs/topics/testing/overview.txt
+++ b/docs/topics/testing/overview.txt
@@ -366,3 +366,12 @@ Preserving the test database
The :option:`test --keepdb` option preserves the test database between test
runs. It skips the create and destroy actions which can greatly decrease the
time to run tests.
+
+Avoiding disk access for media files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. versionadded:: 4.2
+
+The :class:`~django.core.files.storage.InMemoryStorage` is a convenient way to
+prevent disk access for media files. All data is kept in memory, then it gets
+discarded after tests run.