summaryrefslogtreecommitdiff
path: root/tests/staticfiles_tests/test_views.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/staticfiles_tests/test_views.py')
-rw-r--r--tests/staticfiles_tests/test_views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/staticfiles_tests/test_views.py b/tests/staticfiles_tests/test_views.py
index fa817a6ef1..d16f4a2cec 100644
--- a/tests/staticfiles_tests/test_views.py
+++ b/tests/staticfiles_tests/test_views.py
@@ -1,4 +1,5 @@
import posixpath
+from urllib.parse import quote
from django.conf import settings
from django.test import override_settings
@@ -12,8 +13,7 @@ class TestServeStatic(StaticFilesTestCase):
Test static asset serving view.
"""
def _response(self, filepath):
- return self.client.get(
- posixpath.join(settings.STATIC_URL, filepath))
+ return self.client.get(quote(posixpath.join(settings.STATIC_URL, filepath)))
def assertFileContains(self, filepath, text):
self.assertContains(self._response(filepath), text)