Commits

Ben Timby committed 2337da3

Removed use of skipIf (not available in Python < 2.7)

Comments (0)

Files changed (1)

storages/tests/s3boto.py

 import mock
 from uuid import uuid4
 from urllib2 import urlopen
-from unittest import skipIf
 
 from django.test import TestCase
 from django.core.files.base import ContentFile
             reduced_redundancy=self.storage.reduced_redundancy,
         )
 
-    @skipIf(not s3boto.IS_GZIPPED, 'Gzip not available.')
     def test_storage_save_gzip(self):
         """
         Test saving a file with gzip enabled.
         """
+        if not s3boto.IS_GZIPPED:  # Gzip not available.
+            return
         name = 'test_storage_save.css'
         content = ContentFile("I should be gzip'd")
         self.storage.save(name, content)
             reduced_redundancy=self.storage.reduced_redundancy,
         )
 
-    @skipIf(not s3boto.IS_GZIPPED, 'Gzip not available.')
     def test_compress_content_len(self):
         """
         Test that file returned by _compress_content() is readable.
         """
+        if not s3boto.IS_GZIPPED:  # Gzip not available.
+            return
         content = ContentFile("I should be gzip'd")
         content = self.storage._compress_content(content)
         self.assertGreater(len(content.read()), 0)