diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-12-08 11:13:52 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-12-08 11:13:52 +0100 |
| commit | c91667338a4e774e2819ccf4da852dc7b759bc19 (patch) | |
| tree | 42a700d237c85ac2b647999d02d3dcd7d8047068 /tests/regressiontests/httpwrappers | |
| parent | 53b879f045f0e55cc8f4bedff67b5a14f3057561 (diff) | |
Fixed #19357 -- Allow non-ASCII chars in filesystem paths
Thanks kujiu for the report and Aymeric Augustin for the review.
Diffstat (limited to 'tests/regressiontests/httpwrappers')
| -rw-r--r-- | tests/regressiontests/httpwrappers/tests.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/regressiontests/httpwrappers/tests.py b/tests/regressiontests/httpwrappers/tests.py index 2d172ad0e0..a601e541c6 100644 --- a/tests/regressiontests/httpwrappers/tests.py +++ b/tests/regressiontests/httpwrappers/tests.py @@ -14,6 +14,7 @@ from django.http import (QueryDict, HttpResponse, HttpResponseRedirect, parse_cookie) from django.test import TestCase from django.utils.encoding import smart_str +from django.utils._os import upath from django.utils import six from django.utils import unittest @@ -483,7 +484,7 @@ class StreamingHttpResponseTests(TestCase): class FileCloseTests(TestCase): def test_response(self): - filename = os.path.join(os.path.dirname(__file__), 'abc.txt') + filename = os.path.join(os.path.dirname(upath(__file__)), 'abc.txt') # file isn't closed until we close the response. file1 = open(filename) @@ -516,7 +517,7 @@ class FileCloseTests(TestCase): self.assertTrue(file2.closed) def test_streaming_response(self): - filename = os.path.join(os.path.dirname(__file__), 'abc.txt') + filename = os.path.join(os.path.dirname(upath(__file__)), 'abc.txt') # file isn't closed until we close the response. file1 = open(filename) |
