Skip to content
This repository has been archived by the owner on Jul 29, 2020. It is now read-only.

Commit

Permalink
Specifically test saving with the gzip middleware.
Browse files Browse the repository at this point in the history
  • Loading branch information
jezdez committed May 27, 2013
1 parent b3bead6 commit d557654
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -2,6 +2,8 @@ build
compressor/tests/static/CACHE
compressor/tests/static/custom
compressor/tests/static/js/066cd253eada.js
compressor/tests/static/test.txt*

dist
MANIFEST
*.pyc
Expand Down
5 changes: 5 additions & 0 deletions compressor/tests/test_storages.py
Expand Up @@ -29,6 +29,11 @@ def tearDown(self):
storage.default_storage = self.default_storage
settings.COMPRESS_ENABLED = self.old_enabled

def test_gzip_storage(self):
storage.default_storage.save('test.txt', ContentFile('yeah yeah'))
self.assertTrue(os.path.exists(os.path.join(settings.COMPRESS_ROOT, 'test.txt')))
self.assertTrue(os.path.exists(os.path.join(settings.COMPRESS_ROOT, 'test.txt.gz')))

def test_css_tag_with_storage(self):
template = """{% load compress %}{% compress css %}
<link rel="stylesheet" href="{{ STATIC_URL }}css/one.css" type="text/css">
Expand Down

0 comments on commit d557654

Please sign in to comment.