summaryrefslogtreecommitdiff
path: root/tests/files
AgeCommit message (Collapse)Author
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.
2025-04-07Fixed #36298 -- Truncated the overwritten file content in file_move_safe().Sarah Boyce
Regression in 58cd4902a71a3695dd6c21dc957f59c333db364c. Thanks Baptiste Mispelon for the report.
2024-03-24Fixed #35323 -- Prevented file_move_safe() from trying to overwrite existing ↵Ben Cail
file when allow_overwrite is False.
2024-01-26Applied Black's 2024 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/24.1.0
2023-09-11Fixed #34642 -- Added File.open() support for *args and **kwargs.Yves Weissig
2022-10-24Fixed #29027 -- Fixed file_move_safe() crash when moving files with SELinux.Yuri Konotopov
Thanks Florian Apolloner for the review.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-09-02Fixed #33079 -- Fixed get_image_dimensions() on nonexistent images.Stefanos I. Tsaklidis
Thanks Nick Pope for the review.
2020-10-06Skipped GetImageDimensionsTests.test_webp when WEBP is not installed.Mariusz Felisiak
2020-09-15Fixed #31989 -- Fixed return value of ↵Hasan Ramezani
django.core.files.locks.lock()/unlock() on POSIX systems.
2019-11-06Refs #29983 -- Added test for FILE_UPLOAD_TEMP_DIR pathlib support.Jon Dufresne
2019-01-28Fixed #30137 -- Replaced OSError aliases with the canonical OSError.Jon Dufresne
Used more specific errors (e.g. FileExistsError) as appropriate.
2018-08-23Fixed #29705 -- Fixed ImageField RuntimeError crash for WebP files.winkidney
2018-03-08Fixed #29188 -- Fixed ContentFile.size after a write().Alex Stovbur
2017-11-06Fixed #28776 -- Fixed a/an/and typos in docs and comments.Дилян Палаузов
2017-06-05Fixed #26651 -- Kept original file suffix in TemporaryUploadedFile nameClaude Paroz
Thanks Tim Graham for the review.
2017-05-31Fixed #28170 -- Fixed file_move_safe() crash when moving files to a CIFS mount.Derrick Jackson
2017-04-07Fixed #27777 -- Made File.open() work with the with statement (#8310)Ingo Klöcker
Fixed #27777 -- Made File.open() work with the with statement
2017-02-09Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().Tim Graham
2017-01-21Refs #23919 -- Removed misc references to Python 2.Tim Graham
2017-01-20Refs #23919 -- Removed django.test.mock Python 2 compatibility shim.Tim Graham
2017-01-20Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.Tim Graham
These functions do nothing on Python 3.
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18Refs #23919 -- Removed six.PY2/PY3 usageClaude Paroz
Thanks Tim Graham for the review.
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-06-18Reverted "Fixed #26644 -- Allowed wrapping NamedTemporaryFile with File."Tim Graham
This reverts commit 1b407050dd53e56686fdd3e168f8cac4f9be8306 as it introduces a regression in the test for refs #26772.
2016-06-16Fixed #26747 -- Used more specific assertions in the Django test suite.Jon Dufresne
2016-06-14Fixed #26644 -- Allowed wrapping NamedTemporaryFile with File.Hugo Osvaldo Barrera
914c72be2abb1c6dd860cb9279beaa66409ae1b2 introduced a regression that causes saving a NamedTemporaryFile in a FileField to raise a SuspiciousFileOperation. To remedy this, if a File has an absolute path as a filename, use only the basename as the filename.
2016-05-27Fixed #26646 -- Added IOBase methods required by TextIOWrapper to File.Simon Charette
Thanks Tim for the review.
2016-01-29Refs #26022 -- Used context manager version of assertRaises in tests.Hasan
2015-06-12Fixed #24963 -- Added File.seekable() on Python 3.Carson Gee
2015-06-05Cleanup: Removed the try-except-fail antipattern from testsShai Berger
Found cases where testing code was doing try: whatever except (some excption type): self.fail("exception shouldn't be thrown") replaced it with just whatever as this makes the unexpected errors easier to debug, and the tests would fail just as much and aren't rendered less readable. Thanks Markus Holtermann for review
2015-04-07Fixed #24544 -- Fixed get_image_dimensions() on image buffers that Pillow ↵steve
fails to parse. Thanks Steve Kossouho for the report and original patch.
2015-03-25Fixed #24441 -- Changed get_image_dimensions() return value for broken imagesRaúl Cumplido
2015-02-23Guaranteed removal of temporary files during tests.Aymeric Augustin
Dropped the DJANGO_TEST_TEMP_DIR environment variable. Before this change, proper removal depended on the developer passing dir=os.environ['DJANGO_TEST_TMP_DIR'] to tempfile functions.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-11-24Fixed #23888 -- Fixed crash in File.__repr__() when name contains unicode.Sergey Fedoseev
2014-10-30Fixed #8149 -- Made File.__iter__() support universal newlines.Jon Dufresne
The following are recognized as ending a line: the Unix end-of-line convention '\n', the Windows convention '\r\n', and the old Macintosh convention '\r'. http://www.python.org/dev/peps/pep-0278 Thanks tchaumeny for review.
2014-03-21Fixed #22307 -- Fixed SpooledTemporaryFile bug in File class.Hans Lawrenz
Added condition to prevent checking the existence of a file name of a file like object when the name attribute is None. This is necessary because a SpooledTemporaryFile won't exist on the file system or have a name until it has reached its max_size. Also added tests.
2014-03-21Removed PIL compatability layer per deprecation timeline.Tim Graham
refs #19934.
2014-02-20Fixed #22107 -- Fixed django.core.files.File object iteration.Baptiste Mispelon
Due to a mixup between text and bytes, iteration over a File instance was broken under Python 3. Thanks to trac user pdewacht for the report and patch.
2014-01-03Suppressed ResourceWarning in files testsClaude Paroz
2013-12-17Removed superfluous models.py files.Aymeric Augustin
Added comments in the three empty models.py files that are still needed. Adjusted the test runner to add applications corresponding to test labels to INSTALLED_APPS even when they don't have a models module.
2013-11-02Fixed #21302 -- Fixed unused imports and import *.Tim Graham
2013-10-27Rearranged some file-related testsClaude Paroz
Just moving around some tests to be more logically grouped.
2013-10-19Removed unused local variables in tests.Tim Graham
2013-10-18Fixed #21268 -- Fixed E303 pep8 warningsAlasdair Nicol