From 580e9d0045d1b6ffaf7d52751a17b1a5a6075705 Mon Sep 17 00:00:00 2001
From: Julien Phalip <jphalip@gmail.com>
Date: Mon, 17 Nov 2014 02:32:04 +0100
Subject: [PATCH] Fixed a test to correctly calculate a fixture's relative
 path.

---
 tests/fixtures_regress/tests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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):