Ticket #8203: django-win32-8203-tests.patch

File django-win32-8203-tests.patch, 864 bytes (added by snaury, 16 years ago)

Regression test for patch django-win32-8203.patch

  • tests/regressiontests/file_uploads/views.py

    === modified file 'tests/regressiontests/file_uploads/views.py'
     
    22from django.core.files.uploadedfile import UploadedFile
    33from django.http import HttpResponse, HttpResponseServerError
    44from django.utils import simplejson
     5from models import FileModel
    56from uploadhandler import QuotaUploadHandler
    67from django.utils.hashcompat import sha_constructor
    78
     
    4546        if new_hash != submitted_hash:
    4647            return HttpResponseServerError()
    4748
     49    # Adding large file to the database should succeed
     50    largefile = request.FILES['file_field2']
     51    obj = FileModel()
     52    obj.testfile.save(largefile.name, largefile)
     53
    4854    return HttpResponse('')
    4955
    5056def file_upload_echo(request):
Back to Top