summaryrefslogtreecommitdiff
path: root/tests/fixtures_regress
diff options
context:
space:
mode:
authorJulien Phalip <jphalip@gmail.com>2014-11-17 02:32:04 +0100
committerJulien Phalip <jphalip@gmail.com>2014-11-17 02:32:04 +0100
commit580e9d0045d1b6ffaf7d52751a17b1a5a6075705 (patch)
treedc9bdbf18a260d7fb844c279b4da06b8e96019e3 /tests/fixtures_regress
parentfab26cf5e0aaffa99dd6d1378391ffd99c5ce9bc (diff)
downloaddjango-580e9d0045d1b6ffaf7d52751a17b1a5a6075705.tar.gz
Fixed a test to correctly calculate a fixture's relative path.
Diffstat (limited to 'tests/fixtures_regress')
-rw-r--r--tests/fixtures_regress/tests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/fixtures_regress/tests.py b/tests/fixtures_regress/tests.py
index 171ef30fec..89b8fb17ef 100644
--- a/tests/fixtures_regress/tests.py
+++ b/tests/fixtures_regress/tests.py
@@ -898,7 +898,7 @@ class TestLoadFixtureFromOtherAppDirectory(TestCase):
# fixtures_regress depending on how runtests.py is invoked.
# All path separators must be / in order to be a proper regression test on
# Windows, so replace as appropriate.
- relative_prefix = current_dir.replace(os.getcwd(), '', 1)[1:].replace('\\', '/')
+ relative_prefix = os.path.relpath(current_dir, os.getcwd()).replace('\\', '/')
fixtures = [relative_prefix + '/fixtures/absolute.json']
def test_fixtures_loaded(self):