mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft 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
This commit is contained in:
parent
1070c57b83
commit
121d2e3678
106 changed files with 3841 additions and 1020 deletions
|
@ -2,15 +2,15 @@
|
|||
import os
|
||||
import errno
|
||||
import shutil
|
||||
import unittest
|
||||
from StringIO import StringIO
|
||||
|
||||
from django.core.files import temp as tempfile
|
||||
from django.core.files.uploadedfile import SimpleUploadedFile
|
||||
from django.http.multipartparser import MultiPartParser
|
||||
from django.test import TestCase, client
|
||||
from django.utils import simplejson
|
||||
from django.utils import unittest
|
||||
from django.utils.hashcompat import sha_constructor
|
||||
from django.http.multipartparser import MultiPartParser
|
||||
|
||||
from models import FileModel, temp_storage, UPLOAD_TO
|
||||
import uploadhandler
|
||||
|
@ -223,7 +223,7 @@ class FileUploadTests(TestCase):
|
|||
ret = super(POSTAccessingHandler, self).handle_uncaught_exception(request, resolver, exc_info)
|
||||
p = request.POST
|
||||
return ret
|
||||
|
||||
|
||||
post_data = {
|
||||
'name': 'Ringo',
|
||||
'file_field': open(__file__),
|
||||
|
@ -244,7 +244,7 @@ class FileUploadTests(TestCase):
|
|||
response = self.client.post('/file_uploads/upload_errors/', post_data)
|
||||
except reference_error.__class__, err:
|
||||
self.failIf(
|
||||
str(err) == str(reference_error),
|
||||
str(err) == str(reference_error),
|
||||
"Caught a repeated exception that'll cause an infinite loop in file uploads."
|
||||
)
|
||||
except Exception, err:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue