diff --git a/django/core/files/base.py b/django/core/files/base.py
index 6204d71..6a82f80 100644
a
|
b
|
|
1 | 1 | import os |
2 | | try: |
3 | | from cStringIO import StringIO |
4 | | except ImportError: |
5 | | from StringIO import StringIO |
| 2 | from StringIO import StringIO |
6 | 3 | |
7 | 4 | from django.utils.encoding import smart_str, smart_unicode |
8 | 5 | from django.core.files.utils import FileProxyMixin |
diff --git a/tests/regressiontests/file_storage/tests.py b/tests/regressiontests/file_storage/tests.py
index d4530bb..5864732 100644
a
|
b
|
class InconsistentGetImageDimensionsBug(unittest.TestCase):
|
542 | 542 | size_1, size_2 = get_image_dimensions(image), get_image_dimensions(image) |
543 | 543 | self.assertEqual(image_pil.size, size_1) |
544 | 544 | self.assertEqual(size_1, size_2) |
| 545 | |
| 546 | class UnicodeContentFileBug(unittest.TestCase): |
| 547 | """ |
| 548 | Tests that ContentFile instances can contain unicode (#11739) |
| 549 | """ |
| 550 | def test_unicode(self): |
| 551 | """ |
| 552 | ContentFile instances should be able to handle unicode. |
| 553 | """ |
| 554 | snowman = u'☃' |
| 555 | file = ContentFile(snowman) |
| 556 | self.assertEqual(file.read(), snowman) |