Commits

Ian Lewis committed 513c418 Merge

Merge url encoding test case.

  • Participants
  • Parent commits 6e72f4f, 57948be

Comments (0)

Files changed (1)

File storages/tests/s3boto.py

 import mock
 import datetime
+import urlparse
 
 from django.test import TestCase
 from django.core.files.base import ContentFile
             headers=None,
             response_headers=None,
         )
+
+    def test_generated_url_is_encoded(self):
+        self.storage.custom_domain = "mock.cloudfront.net"
+        filename = "whacky & filename.mp4"
+        url = self.storage.url(filename)
+        parsed_url = urlparse.urlparse(url)
+        self.assertEqual(parsed_url.path,
+                         "/whacky%20%26%20filename.mp4")
         
 #class S3BotoStorageFileTests(S3BotoTestCase):
 #    def test_multipart_upload(self):