From 185ba8f7e4faafdc1cafb6d6559015c96345f209 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Sat, 12 Jul 2008 20:44:05 +0000 Subject: [PATCH] FIxed #7696: fixed model_form tests on Windows after [7814]. Thanks, Marty Alchin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7909 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/modeltests/model_forms/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modeltests/model_forms/models.py b/tests/modeltests/model_forms/models.py index f2b0e05cc4..e8598bd68f 100644 --- a/tests/modeltests/model_forms/models.py +++ b/tests/modeltests/model_forms/models.py @@ -900,7 +900,7 @@ u'...test3.txt' ... class Meta: ... model = ImageFile ->>> image_data = open(os.path.join(os.path.dirname(__file__), "test.png")).read() +>>> image_data = open(os.path.join(os.path.dirname(__file__), "test.png"), 'rb').read() >>> f = ImageFileForm(data={'description': u'An image'}, files={'image': SimpleUploadedFile('test.png', image_data)}) >>> f.is_valid()