diff --git a/.gitignore b/.gitignore
index 0662c17..9d802fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
build
compressor/tests/media/CACHE
compressor/tests/media/custom
-compressor/tests/media/js/dc78a3f5af20.js
+compressor/tests/media/js/3f33b9146e12.js
dist
MANIFEST
*.pyc
diff --git a/compressor/base.py b/compressor/base.py
index 9f1447f..11d6a81 100644
--- a/compressor/base.py
+++ b/compressor/base.py
@@ -190,7 +190,7 @@ class Compressor(object):
The output method that saves the content to a file and renders
the appropriate template with the file's URL.
"""
- new_filepath = self.filepath(self.content)
+ new_filepath = self.filepath(content)
if not self.storage.exists(new_filepath) or forced:
self.storage.save(new_filepath, ContentFile(content))
url = self.storage.url(new_filepath)
diff --git a/compressor/tests/tests.py b/compressor/tests/tests.py
index 2008a86..5fdcbd3 100644
--- a/compressor/tests/tests.py
+++ b/compressor/tests/tests.py
@@ -76,7 +76,7 @@ class CompressorTestCase(TestCase):
self.assertEqual('666f3aa8eacd', self.css_node.hash(self.css))
def test_css_return_if_on(self):
- output = u''
+ output = u''
self.assertEqual(output, self.css_node.output().strip())
def test_js_split(self):
@@ -111,20 +111,20 @@ class CompressorTestCase(TestCase):
settings.COMPRESS_PRECOMPILERS = precompilers
def test_js_return_if_on(self):
- output = u''
+ output = u''
self.assertEqual(output, self.js_node.output())
def test_custom_output_dir(self):
try:
old_output_dir = settings.COMPRESS_OUTPUT_DIR
settings.COMPRESS_OUTPUT_DIR = 'custom'
- output = u''
+ output = u''
self.assertEqual(output, JsCompressor(self.js).output())
settings.COMPRESS_OUTPUT_DIR = ''
- output = u''
+ output = u''
self.assertEqual(output, JsCompressor(self.js).output())
settings.COMPRESS_OUTPUT_DIR = '/custom/nested/'
- output = u''
+ output = u''
self.assertEqual(output, JsCompressor(self.js).output())
finally:
settings.COMPRESS_OUTPUT_DIR = old_output_dir
@@ -291,7 +291,7 @@ class TemplatetagTestCase(TestCase):
{% endcompress %}
"""
context = { 'MEDIA_URL': settings.COMPRESS_URL }
- out = u''
+ out = u''
self.assertEqual(out, render(template, context))
def test_nonascii_css_tag(self):
@@ -301,7 +301,7 @@ class TemplatetagTestCase(TestCase):
{% endcompress %}
"""
context = { 'MEDIA_URL': settings.COMPRESS_URL }
- out = ''
+ out = ''
self.assertEqual(out, render(template, context))
def test_js_tag(self):
@@ -311,7 +311,7 @@ class TemplatetagTestCase(TestCase):
{% endcompress %}
"""
context = { 'MEDIA_URL': settings.COMPRESS_URL }
- out = u''
+ out = u''
self.assertEqual(out, render(template, context))
def test_nonascii_js_tag(self):
@@ -321,7 +321,7 @@ class TemplatetagTestCase(TestCase):
{% endcompress %}
"""
context = { 'MEDIA_URL': settings.COMPRESS_URL }
- out = u''
+ out = u''
self.assertEqual(out, render(template, context))
def test_nonascii_latin1_js_tag(self):
@@ -331,7 +331,7 @@ class TemplatetagTestCase(TestCase):
{% endcompress %}
"""
context = { 'MEDIA_URL': settings.COMPRESS_URL }
- out = u''
+ out = u''
self.assertEqual(out, render(template, context))
def test_compress_tag_with_illegal_arguments(self):
@@ -370,7 +370,7 @@ class StorageTestCase(TestCase):
{% endcompress %}
"""
context = { 'MEDIA_URL': settings.COMPRESS_URL }
- out = u''
+ out = u''
self.assertEqual(out, render(template, context))
@@ -403,8 +403,8 @@ class OfflineGenerationTestCase(TestCase):
count, result = CompressCommand().compress()
self.assertEqual(2, count)
self.assertEqual([
- u'\n',
- u'',
+ u'\n',
+ u'',
], result)
def test_offline_with_context(self):
@@ -415,7 +415,7 @@ class OfflineGenerationTestCase(TestCase):
count, result = CompressCommand().compress()
self.assertEqual(2, count)
self.assertEqual([
- u'\n',
- u'',
+ u'\n',
+ u'',
], result)
settings.COMPRESS_OFFLINE_CONTEXT = self._old_offline_context