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/fixtures_regress/tests.py | |
| 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/fixtures_regress/tests.py')
| -rw-r--r-- | tests/regressiontests/fixtures_regress/tests.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/regressiontests/fixtures_regress/tests.py b/tests/regressiontests/fixtures_regress/tests.py index 55363bc5b7..988c5acd0c 100644 --- a/tests/regressiontests/fixtures_regress/tests.py +++ b/tests/regressiontests/fixtures_regress/tests.py @@ -14,6 +14,8 @@ from django.db.models import signals from django.test import (TestCase, TransactionTestCase, skipIfDBFeature, skipUnlessDBFeature) from django.test.utils import override_settings +from django.utils.encoding import force_text +from django.utils._os import upath from django.utils import six from django.utils.six import PY3, StringIO @@ -126,7 +128,7 @@ class TestFixtures(TestCase): fixture directory. """ load_absolute_path = os.path.join( - os.path.dirname(__file__), + os.path.dirname(upath(__file__)), 'fixtures', 'absolute.json' ) @@ -388,7 +390,7 @@ class TestFixtures(TestCase): commit=False, ) - _cur_dir = os.path.dirname(os.path.abspath(__file__)) + _cur_dir = os.path.dirname(os.path.abspath(upath(__file__))) @override_settings(FIXTURE_DIRS=[os.path.join(_cur_dir, 'fixtures_1'), os.path.join(_cur_dir, 'fixtures_2')]) @@ -430,7 +432,7 @@ class TestFixtures(TestCase): stdout=stdout_output, ) self.assertTrue("No xml fixture 'this_fixture_doesnt_exist' in" in - stdout_output.getvalue()) + force_text(stdout_output.getvalue())) class NaturalKeyFixtureTests(TestCase): |
