summaryrefslogtreecommitdiff
path: root/tests/files
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #29027 -- Fixed file_move_safe() crash when moving files with SELinux.Yuri Konotopov2022-10-241-10/+36
| | | | Thanks Florian Apolloner for the review.
* Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak2022-02-071-1/+2
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-071-63/+90
|
* Fixed #33079 -- Fixed get_image_dimensions() on nonexistent images.Stefanos I. Tsaklidis2021-09-021-0/+4
| | | | Thanks Nick Pope for the review.
* Skipped GetImageDimensionsTests.test_webp when WEBP is not installed.Mariusz Felisiak2020-10-061-1/+4
|
* Fixed #31989 -- Fixed return value of ↵Hasan Ramezani2020-09-151-1/+17
| | | | django.core.files.locks.lock()/unlock() on POSIX systems.
* Refs #29983 -- Added test for FILE_UPLOAD_TEMP_DIR pathlib support.Jon Dufresne2019-11-061-0/+8
|
* Fixed #30137 -- Replaced OSError aliases with the canonical OSError.Jon Dufresne2019-01-281-2/+3
| | | | Used more specific errors (e.g. FileExistsError) as appropriate.
* Fixed #29705 -- Fixed ImageField RuntimeError crash for WebP files.winkidney2018-08-232-0/+6
|
* Fixed #29188 -- Fixed ContentFile.size after a write().Alex Stovbur2018-03-081-0/+10
|
* Fixed #28776 -- Fixed a/an/and typos in docs and comments.Дилян Палаузов2017-11-061-1/+1
|
* Fixed #26651 -- Kept original file suffix in TemporaryUploadedFile nameClaude Paroz2017-06-051-1/+9
| | | | Thanks Tim Graham for the review.
* Fixed #28170 -- Fixed file_move_safe() crash when moving files to a CIFS mount.Derrick Jackson2017-05-311-0/+25
|
* Fixed #27777 -- Made File.open() work with the with statement (#8310)Ingo Klöcker2017-04-071-1/+35
| | | Fixed #27777 -- Made File.open() work with the with statement
* Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().Tim Graham2017-02-091-2/+2
|
* Refs #23919 -- Removed misc references to Python 2.Tim Graham2017-01-211-3/+0
|
* Refs #23919 -- Removed django.test.mock Python 2 compatibility shim.Tim Graham2017-01-201-1/+1
|
* Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.Tim Graham2017-01-201-6/+5
| | | These functions do nothing on Python 3.
* Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette2017-01-191-1/+1
|
* Refs #23919 -- Removed six.<various>_types usageClaude Paroz2017-01-181-4/+3
| | | | Thanks Tim Graham and Simon Charette for the reviews.
* Refs #23919 -- Removed six.PY2/PY3 usageClaude Paroz2017-01-181-4/+1
| | | | Thanks Tim Graham for the review.
* Refs #23919 -- Removed encoding preambles and future importsClaude Paroz2017-01-181-3/+0
|
* Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za2016-11-101-4/+4
|
* Reverted "Fixed #26644 -- Allowed wrapping NamedTemporaryFile with File."Tim Graham2016-06-181-6/+0
| | | | | This reverts commit 1b407050dd53e56686fdd3e168f8cac4f9be8306 as it introduces a regression in the test for refs #26772.
* Fixed #26747 -- Used more specific assertions in the Django test suite.Jon Dufresne2016-06-161-2/+2
|
* Fixed #26644 -- Allowed wrapping NamedTemporaryFile with File.Hugo Osvaldo Barrera2016-06-141-0/+6
| | | | | | | 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.
* Fixed #26646 -- Added IOBase methods required by TextIOWrapper to File.Simon Charette2016-05-271-12/+33
| | | | Thanks Tim for the review.
* Refs #26022 -- Used context manager version of assertRaises in tests.Hasan2016-01-291-1/+2
|
* Fixed #24963 -- Added File.seekable() on Python 3.Carson Gee2015-06-121-0/+13
|
* Cleanup: Removed the try-except-fail antipattern from testsShai Berger2015-06-051-5/+1
| | | | | | | | | | | | | | | | | | 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
* Fixed #24544 -- Fixed get_image_dimensions() on image buffers that Pillow ↵steve2015-04-071-2/+19
| | | | | | fails to parse. Thanks Steve Kossouho for the report and original patch.
* Fixed #24441 -- Changed get_image_dimensions() return value for broken imagesRaúl Cumplido2015-03-252-0/+17
|
* Guaranteed removal of temporary files during tests.Aymeric Augustin2015-02-231-2/+2
| | | | | | | 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.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-5/+5
|
* Fixed #23888 -- Fixed crash in File.__repr__() when name contains unicode.Sergey Fedoseev2014-11-241-6/+5
|
* Fixed #8149 -- Made File.__iter__() support universal newlines.Jon Dufresne2014-10-301-1/+49
| | | | | | | | | | 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.
* Fixed #22307 -- Fixed SpooledTemporaryFile bug in File class.Hans Lawrenz2014-03-211-0/+14
| | | | | | | 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.
* Removed PIL compatability layer per deprecation timeline.Tim Graham2014-03-211-8/+8
| | | | refs #19934.
* Fixed #22107 -- Fixed django.core.files.File object iteration.Baptiste Mispelon2014-02-201-0/+8
| | | | | | | 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.
* Suppressed ResourceWarning in files testsClaude Paroz2014-01-031-4/+5
|
* Removed superfluous models.py files.Aymeric Augustin2013-12-171-0/+0
| | | | | | | 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.
* Fixed #21302 -- Fixed unused imports and import *.Tim Graham2013-11-021-2/+0
|
* Rearranged some file-related testsClaude Paroz2013-10-275-159/+140
| | | | Just moving around some tests to be more logically grouped.
* Removed unused local variables in tests.Tim Graham2013-10-191-1/+1
|
* Fixed #21268 -- Fixed E303 pep8 warningsAlasdair Nicol2013-10-181-1/+0
|
* Close file after tests added in 945e033a69.Ramiro Morales2013-10-141-0/+4
| | | | Avoids failures on Windows. Refs #8918.
* Fixed #8918 -- Made FileField.upload_to optional.Tim Graham2013-10-112-0/+7
| | | | | Thanks leahculver for the suggestion and dc and vajrasky for work on the patch.
* Fixed #21122 -- Improved clean up of test temp directory on WindowsKevin Christopher Henry2013-10-021-0/+3
| | | | | - Fixed test that didn't close the files it opened - Caught and handled exception when temp directory cannot be removed
* Fixed #21033 -- Fixed uploaded filenames not always being truncated to 255 ↵homm2013-09-101-1/+0
| | | | characters
* Removed unneeded imports in tests's __init__.py and unified them.Florian Apolloner2013-09-091-1/+0
|