summaryrefslogtreecommitdiff
path: root/tests/regressiontests
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2011-03-18 18:47:14 +0000
committerJannis Leidel <jannis@leidel.info>2011-03-18 18:47:14 +0000
commitbd0daa04f5c886c8eeebac0c48ef6a326cbf689e (patch)
treec48fd4e259ab8288432e0054413510b37ee2ec0e /tests/regressiontests
parent0ff6bbf1db472933742d88179d3985a01e2546eb (diff)
Fixed staticfiles test that was broken on Windows due to the result of the stdout not being correctly handled as Unicode.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15879 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests')
-rw-r--r--tests/regressiontests/staticfiles_tests/tests.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/regressiontests/staticfiles_tests/tests.py b/tests/regressiontests/staticfiles_tests/tests.py
index ae514be101..b8a7aa6d33 100644
--- a/tests/regressiontests/staticfiles_tests/tests.py
+++ b/tests/regressiontests/staticfiles_tests/tests.py
@@ -66,10 +66,10 @@ class StaticFilesTestCase(TestCase):
# To make sure SVN doesn't hangs itself with the non-ASCII characters
# during checkout, we actually create one file dynamically.
self._nonascii_filepath = os.path.join(
- TEST_ROOT, 'apps', 'test', 'static', 'test', u'fişier.txt')
+ TEST_ROOT, 'apps', 'test', 'static', 'test', u'fi\u015fier.txt')
f = codecs.open(self._nonascii_filepath, 'w', 'utf-8')
try:
- f.write(u"fişier in the app dir")
+ f.write(u"fi\u015fier in the app dir")
finally:
f.close()
@@ -183,7 +183,8 @@ class TestFindStatic(BuildStaticTestCase, TestDefaults):
call_command('findstatic', filepath, all=False, verbosity='0')
sys.stdout.seek(0)
lines = [l.strip() for l in sys.stdout.readlines()]
- contents = codecs.open(lines[1].strip(), "r", "utf-8").read()
+ contents = codecs.open(
+ smart_unicode(lines[1].strip()), "r", "utf-8").read()
finally:
sys.stdout = _stdout
return contents