From afa98dba98e3ba7ccf77ec9ec41eb12b162ab76f Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Fri, 8 Aug 2008 16:03:49 +0000 Subject: [PATCH] Added an import that was missed in [8193]. Thanks Karen Tracey. Fixed #8143. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8233 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/file_uploads/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/regressiontests/file_uploads/views.py b/tests/regressiontests/file_uploads/views.py index c45f6a609f..e9115f7fa1 100644 --- a/tests/regressiontests/file_uploads/views.py +++ b/tests/regressiontests/file_uploads/views.py @@ -1,9 +1,9 @@ import os -import sha from django.core.files.uploadedfile import UploadedFile from django.http import HttpResponse, HttpResponseServerError from django.utils import simplejson from uploadhandler import QuotaUploadHandler +from django.utils.hashcompat import sha_constructor def file_upload_view(request): """ @@ -39,9 +39,9 @@ def file_upload_view_verify(request): continue submitted_hash = form_data[key + '_hash'] if isinstance(value, UploadedFile): - new_hash = sha.new(value.read()).hexdigest() + new_hash = sha_constructor(value.read()).hexdigest() else: - new_hash = sha.new(value).hexdigest() + new_hash = sha_constructor(value).hexdigest() if new_hash != submitted_hash: return HttpResponseServerError()