summaryrefslogtreecommitdiff
path: root/tests/regressiontests/file_uploads/tests.py
AgeCommit message (Collapse)Author
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner
2012-11-17Fixed #19036 -- Fixed base64 uploads decodingClaude Paroz
Thanks anthony at adsorbtion.org for the report, and johannesl for bringing the patch up-to-date.
2012-10-30Prevented file_upload tests to leave files behindClaude Paroz
Refs #19206.
2012-10-20Fixed #19094 -- Improved FakePayload to support write, len and string inputClaude Paroz
Thanks Ondrej Slinták for the suggestion.
2012-09-07Removed another usage of the bear "except:" (rawr!).Alex Gaynor
2012-09-07Removed many uses of bare "except:", which were either going to a) silence ↵Alex Gaynor
real issues, or b) were impossible to hit.
2012-08-29Replaced many smart_bytes by force_bytesClaude Paroz
In all those occurrences, we didn't care about preserving the lazy status of the strings, but we really wanted to obtain a real bytestring.
2012-08-14[py3] Fixed file_uploads testsClaude Paroz
2012-08-13[py3] Removed filename encoding in file_uploads testClaude Paroz
2012-08-08[py3] Used compatible imports of StringIO.Aymeric Augustin
2012-07-20Switched to Python 3-compatible octal notation.Aymeric Augustin
2012-06-07Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
2012-05-19Marked bytestrings with b prefix. Refs #18269Claude Paroz
This is a preparation for unicode literals general usage in Django (Python 3 compatibility).
2012-05-05Made more extensive usage of context managers with open.Claude Paroz
2012-05-03Replaced deprecated TestCase methods. Refs #17049.Claude Paroz
2012-04-29Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz
Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29Fixed #18023 -- Removed bundled simplejson.Aymeric Augustin
And started the deprecation path for django.utils.simplejson. Thanks Alex Ogier, Clueless, and other contributors for their work on the patch.
2011-10-13Convert much of the regression tests to use absolute imports. There's still ↵Alex Gaynor
work to be done though. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16976 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for ↵Jannis Leidel
the work on the patch and Alex for reviewing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-28Fixed #15785 -- Stopped HttpRequest.read() from reading beyond the end of a ↵Jannis Leidel
wsgi.input stream and removed some redundant code in the multipartparser. Thanks, tomchristie, grahamd and isagalaev. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16479 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-22Fixes #8593 -- better handling of safe_join case sensitivity on windows. ↵Chris Beaven
Thanks for the initial patch, ramiro. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16267 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-07Fixed #15496 -- Corrected handling of base64 file upload encoding. Thanks, ↵Jannis Leidel
gene and Claude Paroz. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16176 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28Removed a bunch more Python 2.4 workarounds now that we don't support that ↵Adrian Holovaty
version. Refs #15702 -- thanks to jonash for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03Updated test assertions that have been deprecated by the move to unittest2. ↵Russell Keith-Magee
In summary, this means: assert_ -> assertTrue assertEquals -> assertEqual failUnless -> assertTrue For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04Removed all usages of deprecated TestCase methods (self.fail*). This ↵Alex Gaynor
removed most of the Warnings emitted (with -Wall) during the test suite. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft ↵Russell Keith-Magee
patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08Fixed #10687: fixed request parsing when upload_handlers is empty. Thanks, ↵Jacob Kaplan-Moss
Armin Ronacher. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-05Made a set of small test changes to avoid leaving temp files hanging around ↵Karen Tracey
after running the test suite. First, fixed a couple of places where temp dirs were (or could be) created without later being deleted. Second, added a missing close() before unlink() since Windows raises an error on an attempt to remove an open file. Finally, in the file_uploads tests, avoided opening-by-name temporary files that we already have a descriptor for. Doing additional opens seems to run afoul of the Windows issue with deleting open files, so it generally works better to just seek back to 0 instead of calling open multiple times. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10406 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-04Fixed #10254: Changed the regex in get_valid_filename to allow unicode ↵Karen Tracey
alphanumerics (thanks gulliver). Also updated the file_uploads test for this case to check the name after saving the uploaded file. As it was the test ensured that files with unicode characters in their names could be uploaded, but it wasn't actually ensuring that the unicode characters were preserved through save. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10388 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16Fixed #8138 -- Changed django.test.TestCase to rollback tests (when the ↵Karen Tracey
database supports it) instead of flushing and reloading the database. This can substantially reduce the time it takes to run large test suites. This change may be slightly backwards incompatible, if existing tests need to test transactional behavior, or if they rely on invalid assumptions or a specific test case ordering. For the first case, django.test.TransactionTestCase should be used. TransactionTestCase is also a quick fix to get around test case errors revealed by the new rollback approach, but a better long-term fix is to correct the test case. See the testing doc for full details. Many thanks to: * Marc Remolt for the initial proposal and implementation. * Luke Plant for initial testing and improving the implementation. * Ramiro Morales for feedback and help with tracking down a mysterious PostgreSQL issue. * Eric Holscher for feedback regarding the effect of the change on the Ellington testsuite. * Russell Keith-Magee for guidance and feedback from beginning to end. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9756 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-30Fixed #8622: accessing POST after a POST handling exception no longer throws ↵Jacob Kaplan-Moss
the server into an infinite loop. Thanks to vung for tracking this one down and fixing it. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8748 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08File storage refactoring, adding far more flexibility to Django's file ↵Jacob Kaplan-Moss
handling. The new files.txt document has details of the new features. This is a backwards-incompatible change; consult BackwardsIncompatibleChanges for details. Fixes #3567, #3621, #4345, #5361, #5655, #7415. Many thanks to Marty Alchin who did the vast majority of this work. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8244 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-02Fixed #7919 -- md5 and sha modules are deprecated since Python 2.5, use ↵Gary Wilson Jr
hashlib module when available. Patch from Karen Tracey. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26Fixed #7658 -- Added some Windows-specific tempfile handling. The standardMalcolm Tredinnick
stuff doesn't work with the way Django's file uploading code wants to operate. Patch from Mike Axiak. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8096 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-20Fixed #6450 -- Improved the checking of errors when creating the directories ↵Russell Keith-Magee
for saved files. Thanks to henry@precheur.org for the report and patch, and vung for the excellent test case. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8007 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-12Fixed #7613: fixed file_upload tests when LANG=C. Thanks, eddymul.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7904 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-07Fixed #7651: uploading multiple files with the same name now work. Also, in ↵Jacob Kaplan-Moss
order to test the problem the test client now handles uploading multiple files at once. Patch from Mike Axiak. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7858 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-01Fixed #2070: refactored Django's file upload capabilities.Jacob Kaplan-Moss
A description of the new features can be found in the new [http://www.djangoproject.com/documentation/upload_handing/ upload handling documentation]; the executive summary is that Django will now happily handle uploads of large files without issues. This changes the representation of uploaded files from dictionaries to bona fide objects; see BackwardsIncompatibleChanges for details. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7814 bcc190cf-cafb-0310-a4f2-bffc1f526a37