Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed staticfiles test that was broken on Windows due to the result o…

…f the stdout not being correctly handled as Unicode.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15879 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit bd0daa04f5c886c8eeebac0c48ef6a326cbf689e 1 parent 0ff6bbf
Jannis Leidel authored March 18, 2011
7  tests/regressiontests/staticfiles_tests/tests.py
@@ -66,10 +66,10 @@ def setUp(self):
66 66
         # To make sure SVN doesn't hangs itself with the non-ASCII characters
67 67
         # during checkout, we actually create one file dynamically.
68 68
         self._nonascii_filepath = os.path.join(
69  
-            TEST_ROOT, 'apps', 'test', 'static', 'test', u'fişier.txt')
  69
+            TEST_ROOT, 'apps', 'test', 'static', 'test', u'fi\u015fier.txt')
70 70
         f = codecs.open(self._nonascii_filepath, 'w', 'utf-8')
71 71
         try:
72  
-            f.write(u"fişier in the app dir")
  72
+            f.write(u"fi\u015fier in the app dir")
73 73
         finally:
74 74
             f.close()
75 75
 
@@ -183,7 +183,8 @@ def _get_file(self, filepath):
183 183
             call_command('findstatic', filepath, all=False, verbosity='0')
184 184
             sys.stdout.seek(0)
185 185
             lines = [l.strip() for l in sys.stdout.readlines()]
186  
-            contents = codecs.open(lines[1].strip(), "r", "utf-8").read()
  186
+            contents = codecs.open(
  187
+                smart_unicode(lines[1].strip()), "r", "utf-8").read()
187 188
         finally:
188 189
             sys.stdout = _stdout
189 190
         return contents

0 notes on commit bd0daa0

Please sign in to comment.
Something went wrong with that request. Please try again.