summaryrefslogtreecommitdiff
path: root/tests/modeltests/model_forms
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modeltests/model_forms')
-rw-r--r--tests/modeltests/model_forms/models.py2
1 files changed, 1 insertions, 1 deletions
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()