aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc/resources
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-06-22 16:39:30 +0100
committerMatthew Lemon <y@yulqen.org>2024-06-22 16:39:30 +0100
commit2a53bbfd6918210a27f0b83bac963bf622b4744c (patch)
tree25b29658e0b37688f5aca945b62ac063c0baee73 /pyblackbird_cc/resources
parent9667a4868760741fab894ef88e403f7ecb512e61 (diff)
Removes unnecessary comment
Diffstat (limited to 'pyblackbird_cc/resources')
-rw-r--r--pyblackbird_cc/resources/tests/test_file_processing.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/pyblackbird_cc/resources/tests/test_file_processing.py b/pyblackbird_cc/resources/tests/test_file_processing.py
index cbb4972..e3514c9 100644
--- a/pyblackbird_cc/resources/tests/test_file_processing.py
+++ b/pyblackbird_cc/resources/tests/test_file_processing.py
@@ -9,34 +9,6 @@ from pyblackbird_cc.resources.views import _get_pdf_collection_type
from .. import services
-""" Explanation:
-The type of uploaded file object (InMemoryUploadedFile, TemporaryUploadedFile, or SimpleUploadedFile) is determined by the size of
-the uploaded file and the value of the FILE_UPLOAD_MAX_MEMORY_SIZE setting in Django.
-
-By default, FILE_UPLOAD_MAX_MEMORY_SIZE is set to 2.5 MB (2621440 bytes). This means that if the size of the uploaded file
-is less than or equal to 2.5 MB, Django will use the MemoryFileUploadHandler to handle the file upload, and the resulting uploaded
-file object will be an instance of InMemoryUploadedFile.
-
-If the size of the uploaded file exceeds the FILE_UPLOAD_MAX_MEMORY_SIZE threshold, Django will use the TemporaryFileUploadHandler to
-handle the file upload, and the resulting uploaded file object will be an instance of TemporaryUploadedFile. In this case, the uploaded
-file is temporarily stored on disk instead of being kept in memory.
-
-The SimpleUploadedFile is used when you manually create an uploaded file object in your code, such as in tests or when handling file
-uploads programmatically.
-
-To test the behavior with different file sizes, you can try the following:
-
-Create a test file that is smaller than 2.5 MB and run the test. The uploaded file should be an instance of InMemoryUploadedFile.
-Create a test file that is larger than 2.5 MB and run the test. The uploaded file should be an instance of TemporaryUploadedFile.
-If you want to change the threshold size for using InMemoryUploadedFile, you can modify the FILE_UPLOAD_MAX_MEMORY_SIZE setting in your Django settings file. For example:
-FILE_UPLOAD_MAX_MEMORY_SIZE = 5 * 1024 * 1024 # 5 MB
-
-With this setting, files up to 5 MB will be handled as InMemoryUploadedFile, and files larger than 5 MB will be handled as TemporaryUploadedFile.
-Remember to test with files of different sizes to ensure that your application handles file uploads correctly based on your specific requirements and settings.
-
-We also test the integrity of the uploaded PDF file here by checking the number of pages in the file and whether it is a valid PDF file.
-"""
-
def test_detect_snapshotted_pdf_collection():
single_pdf_single_page = [["toss"]]