1
0
mirror of https://github.com/django/django.git synced 2024-12-25 02:26:12 +00:00

Tested that spaces are properly escaped in files URLs. Refs #5160.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17361 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Aymeric Augustin 2012-01-08 19:23:57 +00:00
parent 4a92059b08
commit 78c92c4167

View File

@ -229,8 +229,8 @@ class FileStorageTests(unittest.TestCase):
# should encode special chars except ~!*()' # should encode special chars except ~!*()'
# like encodeURIComponent() JavaScript function do # like encodeURIComponent() JavaScript function do
self.assertEqual(self.storage.url(r"""~!*()'@#$%^&*abc`+=.file"""), self.assertEqual(self.storage.url(r"""~!*()'@#$%^&*abc`+ =.file"""),
"""/test_media_url/~!*()'%40%23%24%25%5E%26*abc%60%2B%3D.file""") """/test_media_url/~!*()'%40%23%24%25%5E%26*abc%60%2B%20%3D.file""")
# should stanslate os path separator(s) to the url path separator # should stanslate os path separator(s) to the url path separator
self.assertEqual(self.storage.url("""a/b\\c.file"""), self.assertEqual(self.storage.url("""a/b\\c.file"""),