summaryrefslogtreecommitdiff
path: root/django/test/testcases.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/test/testcases.py')
-rw-r--r--django/test/testcases.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py
index 017c6eefd0..ea63ac550e 100644
--- a/django/test/testcases.py
+++ b/django/test/testcases.py
@@ -1524,7 +1524,7 @@ class FSFilesHandler(WSGIHandler):
def file_path(self, url):
"""Return the relative path to the file on disk for the given URL."""
- relative_url = url[len(self.base_url[2]) :]
+ relative_url = url.removeprefix(self.base_url[2])
return url2pathname(relative_url)
def get_response(self, request):