From ccbadbc5c2255629abb7f84f1aead4c9b1dc86d4 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Wed, 1 Feb 2012 21:36:18 +0000 Subject: [PATCH] Improved the fix of r17416 so it actually works on all platforms. Refs #17469. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17417 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/test/testcases.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/test/testcases.py b/django/test/testcases.py index c2fe15e9022..af455a28725 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -998,8 +998,8 @@ class _MediaFilesHandler(StaticFilesHandler): return settings.MEDIA_URL def serve(self, request): - return serve(request, request.path, - document_root=self.get_base_dir()) + relative_url = request.path[len(self.base_url[2]):] + return serve(request, relative_url, document_root=self.get_base_dir()) class LiveServerThread(threading.Thread):