diff options
author | Tim Graham <timograham@gmail.com> | 2015-01-07 19:02:14 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2015-01-07 19:12:37 -0500 |
commit | f487a3275ebb786d3e7716e1ed9cc994bd092f34 (patch) | |
tree | 66eefda5b2c017d59497ac5ae5d79c37573dc95e /tests/file_uploads | |
parent | 8713ea7568af8871bf1306f14cc928058df0d4c7 (diff) | |
download | django-f487a3275ebb786d3e7716e1ed9cc994bd092f34.tar.gz |
Avoided a deprecated alias on Python 3 in file_uploads test.
Diffstat (limited to 'tests/file_uploads')
-rw-r--r-- | tests/file_uploads/tests.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/file_uploads/tests.py b/tests/file_uploads/tests.py index 37954a99ca..130a3c7649 100644 --- a/tests/file_uploads/tests.py +++ b/tests/file_uploads/tests.py @@ -17,7 +17,7 @@ from django.test import TestCase, client from django.test import override_settings from django.utils.encoding import force_bytes from django.utils.http import urlquote -from django.utils.six import BytesIO, StringIO +from django.utils.six import BytesIO, PY2, StringIO from . import uploadhandler from .models import FileModel @@ -108,7 +108,8 @@ class FileUploadTests(TestCase): def test_big_base64_newlines_upload(self): self._test_base64_upload( - "Big data" * 68000, encode=base64.encodestring) + # encodestring is a deprecated alias on Python 3 + "Big data" * 68000, encode=base64.encodestring if PY2 else base64.encodebytes) def test_unicode_file_name(self): tdir = sys_tempfile.mkdtemp() |