summaryrefslogtreecommitdiff
path: root/tests/file_uploads/views.py
AgeCommit message (Collapse)Author
2026-02-10Modified tests to format PKs with %s rather than %d.Tim Graham
It's how Django formats values internally and makes tests compatible with databases that use non-integer primary keys.
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2022-12-30Refs #34100 -- Made file upload tests use Storage.exists() where appropriate.Francesco Panico
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-04-06Fixed CVE-2021-28658 -- Fixed potential directory-traversal via uploaded files.Mariusz Felisiak
Thanks Claude Paroz for the initial patch. Thanks Dennis Brinkrolf for the report.
2020-09-30Fixed #30422 -- Made TemporaryFileUploadHandler handle interrupted uploads.aryan
This patch allows upload handlers to handle interrupted uploads. Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-09-30Refs #30422 -- Added test for removing temporary files in MultiPartParser ↵aryan
when StopUpload is raised.
2020-04-20Capitalized Unicode in docs, strings, and comments.Jon Dufresne
2019-02-09Refs #15362 -- Removed obsolete workaround in file_uploads test view.Jon Dufresne
2019-02-09Removed default empty content argument from HttpResponse calls.Jon Dufresne
2018-02-07Refs #27795 -- Removed force_bytes/text() usage in tests.Tim Graham
2017-05-27Fixed #28249 -- Removed unnecessary dict.keys() calls.Jon Dufresne
iter(dict) is equivalent to iter(dict.keys()).
2017-02-09Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().Tim Graham
2017-02-08Used JsonResponse and response.json in file_uploads tests.Tim Graham
2017-01-20Refs #23919 -- Removed unneeded force_str callsClaude Paroz
2017-01-19Refs #23919 -- Removed obsolete contextlib.closing() calls (for Python 2).Tim Graham
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-09-03Replaced smart_* by force_* calls whenever possibleClaude Paroz
The smart_* version should only be used when a lazy string should keep its lazy status.
2015-07-06Fixed some unclosed objects in testsAndriy Sokolovskiy
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-12-08Fixed #23968 -- Replaced list comprehension with generators and dict ↵Jon Dufresne
comprehension
2014-06-11Fixed #22680 -- I/O operation on closed file.Florian Apolloner
This patch is two-fold; first it ensure that Django does close everything in request.FILES at the end of the request and secondly the storage system should no longer close any files during save, it's up to the caller to handle that -- or let Django close the files at the end of the request.
2013-11-02PEP8 cleanupJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-08-30Fixed #20989 -- Removed useless explicit list comprehensions.Simon Charette
2013-07-29Removed most of absolute_import importsClaude Paroz
Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
2013-07-11Fixed #13721 -- Added UploadedFile.content_type_extra.Benjamin Kagia
Thanks Waldemar Kornewald and mvschaik for work on the patch.
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner