summaryrefslogtreecommitdiff
path: root/tests/files
AgeCommit message (Collapse)Author
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
2013-10-14Close file after tests added in 945e033a69.Ramiro Morales
Avoids failures on Windows. Refs #8918.
2013-10-11Fixed #8918 -- Made FileField.upload_to optional.Tim Graham
Thanks leahculver for the suggestion and dc and vajrasky for work on the patch.
2013-10-02Fixed #21122 -- Improved clean up of test temp directory on WindowsKevin Christopher Henry
- Fixed test that didn't close the files it opened - Caught and handled exception when temp directory cannot be removed
2013-09-10Fixed #21033 -- Fixed uploaded filenames not always being truncated to 255 ↵homm
characters
2013-09-09Removed unneeded imports in tests's __init__.py and unified them.Florian Apolloner
2013-09-06Fixed #11857 -- Added missing 'closed' property on TemporaryFile class.Christopher Adams
- TemporaryFile now minimally mocks the API of the Python standard library class tempfile.NamedTemporaryFile to avoid AttributeError exceptions. - The symbol django.core.files.NamedTemporaryFile is actually assigned as a different class on different operating systems. - The bug only occurred if Django is running on Windows, hence why it was hard to diagnose.
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-01Stopped using django.utils.unittest in the test suite.Aymeric Augustin
Refs #20680.
2013-06-20Fixed #20486 -- Ensure that file_move_safe raises an error if the ↵Russell Keith-Magee
destination already exists. Thanks to kux for the report, and Russ Webber for the patch.
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner