From d557654d3470fffa2d2fd552358077db4ec72dd0 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Mon, 27 May 2013 12:52:17 +0200 Subject: [PATCH] Specifically test saving with the gzip middleware. --- .gitignore | 2 ++ compressor/tests/test_storages.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index 282767d..4b1a2c3 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/compressor/tests/test_storages.py b/compressor/tests/test_storages.py index f307d5d..91a36f2 100644 --- a/compressor/tests/test_storages.py +++ b/compressor/tests/test_storages.py @@ -29,6 +29,11 @@ class StorageTestCase(TestCase): 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 %}