Commits

Anonymous committed 2225f81

test storage url

  • Participants
  • Parent commits 0ebe132

Comments (0)

Files changed (1)

storages/tests/s3boto.py

 from uuid import uuid4
 import os
 from storages.backends.s3boto import S3BotoStorage
+from urllib2 import urlopen
 
 class S3BotoStorageTests(TestCase):
     def setUp(self):
         self.storage.save(name, f)
         self.assertEqual(self.storage.size(name), f.size)
         
+    def test_storage_url(self):
+        name = self.prefix_path('test_storage_size.txt')
+        content = 'new content'
+        f = ContentFile(content)
+        self.storage.save(name, f)
+        self.assertEqual(content, urlopen(self.storage.url(name)).read())