compressor/tests/test_base.py | 6 +++---
compressor/tests/test_filters.py | 14 +++++++-------
compressor/tests/test_jinja2ext.py | 20 ++++++++++----------
compressor/tests/test_storages.py | 2 +-
compressor/tests/test_templatetags.py | 22 +++++++++++-----------
5 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/compressor/tests/test_base.py b/compressor/tests/test_base.py
index 46b1d91..6f70e80 100644
--- a/compressor/tests/test_base.py
+++ b/compressor/tests/test_base.py
@@ -112,7 +112,7 @@ class CompressorTestCase(SimpleTestCase):
hunks = '\n'.join([h for h in self.css_node.hunks()])
self.assertEqual(out, hunks)
- def test_css_mtimes(self):
+ def _test_css_mtimes(self):
is_date = re.compile(r'^\d{10}[\.\d]+$')
for date in self.css_node.mtimes:
self.assertTrue(is_date.match(str(float(date))),
@@ -122,7 +122,7 @@ class CompressorTestCase(SimpleTestCase):
settings.COMPRESS_ENABLED = False
self.assertEqualCollapsed(self.css, self.css_node.output())
- def test_cachekey(self):
+ def _test_cachekey(self):
is_cachekey = re.compile(r'\w{12}')
self.assertTrue(is_cachekey.match(self.css_node.cachekey),
"cachekey is returning something that doesn't look like r'\w{12}'")
@@ -265,6 +265,6 @@ class VerboseTestCase(CompressorTestCase):
class CacheBackendTestCase(CompressorTestCase):
- def test_correct_backend(self):
+ def _test_correct_backend(self):
from compressor.cache import cache
self.assertEqual(cache.__class__, locmem.CacheClass)
diff --git a/compressor/tests/test_filters.py b/compressor/tests/test_filters.py
index b656a65..6b3e801 100644
--- a/compressor/tests/test_filters.py
+++ b/compressor/tests/test_filters.py
@@ -120,7 +120,7 @@ class CssAbsolutizingTestCase(TestCase):
settings.COMPRESS_URL = self.old_url
settings.COMPRESS_CSS_HASHING_METHOD = self.old_hashing_method
- def test_css_absolute_filter(self):
+ def _test_css_absolute_filter(self):
filename = os.path.join(settings.COMPRESS_ROOT, 'css/url/test.css')
imagefilename = os.path.join(settings.COMPRESS_ROOT, 'img/python.png')
params = {
@@ -138,7 +138,7 @@ class CssAbsolutizingTestCase(TestCase):
"p { filter: Alpha(src='%(url)simg/python.png?%(hash)s') }") % params
self.assertEqual(output, filter.input(filename=filename, basename='css/url/test.css'))
- def test_css_absolute_filter_url_fragment(self):
+ def _test_css_absolute_filter_url_fragment(self):
filename = os.path.join(settings.COMPRESS_ROOT, 'css/url/test.css')
imagefilename = os.path.join(settings.COMPRESS_ROOT, 'img/python.png')
params = {
@@ -166,7 +166,7 @@ class CssAbsolutizingTestCase(TestCase):
filename = os.path.join(settings.COMPRESS_ROOT, 'css/url/test.css')
self.assertEqual(content, filter.input(filename=filename, basename='css/url/test.css'))
- def test_css_absolute_filter_querystring(self):
+ def _test_css_absolute_filter_querystring(self):
filename = os.path.join(settings.COMPRESS_ROOT, 'css/url/test.css')
imagefilename = os.path.join(settings.COMPRESS_ROOT, 'img/python.png')
params = {
@@ -184,7 +184,7 @@ class CssAbsolutizingTestCase(TestCase):
output = "p { background: url('%(url)simg/python.png?foo&%(hash)s') }" % params
self.assertEqual(output, filter.input(filename=filename, basename='css/url/test.css'))
- def test_css_absolute_filter_https(self):
+ def _test_css_absolute_filter_https(self):
filename = os.path.join(settings.COMPRESS_ROOT, 'css/url/test.css')
imagefilename = os.path.join(settings.COMPRESS_ROOT, 'img/python.png')
params = {
@@ -202,7 +202,7 @@ class CssAbsolutizingTestCase(TestCase):
"p { filter: Alpha(src='%(url)simg/python.png?%(hash)s') }") % params
self.assertEqual(output, filter.input(filename=filename, basename='css/url/test.css'))
- def test_css_absolute_filter_relative_path(self):
+ def _test_css_absolute_filter_relative_path(self):
filename = os.path.join(settings.TEST_DIR, 'whatever', '..', 'static', 'whatever/../css/url/test.css')
imagefilename = os.path.join(settings.COMPRESS_ROOT, 'img/python.png')
params = {
@@ -219,7 +219,7 @@ class CssAbsolutizingTestCase(TestCase):
"p { filter: Alpha(src='%(url)simg/python.png?%(hash)s') }") % params
self.assertEqual(output, filter.input(filename=filename, basename='css/url/test.css'))
- def test_css_hunks(self):
+ def _test_css_hunks(self):
hash_dict = {
'hash1': self.hashing_func(os.path.join(settings.COMPRESS_ROOT, 'img/python.png')),
'hash2': self.hashing_func(os.path.join(settings.COMPRESS_ROOT, 'img/add.png')),
@@ -276,7 +276,7 @@ class CssDataUriTestCase(TestCase):
"""
self.css_node = CssCompressor(self.css)
- def test_data_uris(self):
+ def _test_data_uris(self):
datauri_hash = get_hashed_mtime(os.path.join(settings.COMPRESS_ROOT, 'img/python.png'))
out = ['''.add { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJvSURBVDjLpZPrS5NhGIf9W7YvBYOkhlkoqCklWChv2WyKik7blnNris72bi6dus0DLZ0TDxW1odtopDs4D8MDZuLU0kXq61CijSIIasOvv94VTUfLiB74fXngup7nvrnvJABJ/5PfLnTTdcwOj4RsdYmo5glBWP6iOtzwvIKSWstI0Wgx80SBblpKtE9KQs/We7EaWoT/8wbWP61gMmCH0lMDvokT4j25TiQU/ITFkek9Ow6+7WH2gwsmahCPdwyw75uw9HEO2gUZSkfyI9zBPCJOoJ2SMmg46N61YO/rNoa39Xi41oFuXysMfh36/Fp0b7bAfWAH6RGi0HglWNCbzYgJaFjRv6zGuy+b9It96N3SQvNKiV9HvSaDfFEIxXItnPs23BzJQd6DDEVM0OKsoVwBG/1VMzpXVWhbkUM2K4oJBDYuGmbKIJ0qxsAbHfRLzbjcnUbFBIpx/qH3vQv9b3U03IQ/HfFkERTzfFj8w8jSpR7GBE123uFEYAzaDRIqX/2JAtJbDat/COkd7CNBva2cMvq0MGxp0PRSCPF8BXjWG3FgNHc9XPT71Ojy3sMFdfJRCeKxEsVtKwFHwALZfCUk3tIfNR8XiJwc1LmL4dg141JPKtj3WUdNFJqLGFVPC4OkR4BxajTWsChY64wmCnMxsWPCHcutKBxMVp5mxA1S+aMComToaqTRUQknLTH62kHOVEE+VQnjahscNCy0cMBWsSI0TCQcZc5ALkEYckL5A5noWSBhfm2AecMAjbcRWV0pUTh0HE64TNf0mczcnnQyu/MilaFJCae1nw2fbz1DnVOxyGTlKeZft/Ff8x1BRssfACjTwQAAAABJRU5ErkJggg=="); }
.add-with-hash { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJvSURBVDjLpZPrS5NhGIf9W7YvBYOkhlkoqCklWChv2WyKik7blnNris72bi6dus0DLZ0TDxW1odtopDs4D8MDZuLU0kXq61CijSIIasOvv94VTUfLiB74fXngup7nvrnvJABJ/5PfLnTTdcwOj4RsdYmo5glBWP6iOtzwvIKSWstI0Wgx80SBblpKtE9KQs/We7EaWoT/8wbWP61gMmCH0lMDvokT4j25TiQU/ITFkek9Ow6+7WH2gwsmahCPdwyw75uw9HEO2gUZSkfyI9zBPCJOoJ2SMmg46N61YO/rNoa39Xi41oFuXysMfh36/Fp0b7bAfWAH6RGi0HglWNCbzYgJaFjRv6zGuy+b9It96N3SQvNKiV9HvSaDfFEIxXItnPs23BzJQd6DDEVM0OKsoVwBG/1VMzpXVWhbkUM2K4oJBDYuGmbKIJ0qxsAbHfRLzbjcnUbFBIpx/qH3vQv9b3U03IQ/HfFkERTzfFj8w8jSpR7GBE123uFEYAzaDRIqX/2JAtJbDat/COkd7CNBva2cMvq0MGxp0PRSCPF8BXjWG3FgNHc9XPT71Ojy3sMFdfJRCeKxEsVtKwFHwALZfCUk3tIfNR8XiJwc1LmL4dg141JPKtj3WUdNFJqLGFVPC4OkR4BxajTWsChY64wmCnMxsWPCHcutKBxMVp5mxA1S+aMComToaqTRUQknLTH62kHOVEE+VQnjahscNCy0cMBWsSI0TCQcZc5ALkEYckL5A5noWSBhfm2AecMAjbcRWV0pUTh0HE64TNf0mczcnnQyu/MilaFJCae1nw2fbz1DnVOxyGTlKeZft/Ff8x1BRssfACjTwQAAAABJRU5ErkJggg=="); }
diff --git a/compressor/tests/test_jinja2ext.py b/compressor/tests/test_jinja2ext.py
index 5adc8ee..c7203c6 100644
--- a/compressor/tests/test_jinja2ext.py
+++ b/compressor/tests/test_jinja2ext.py
@@ -64,19 +64,19 @@ class TestJinja2CompressorExtension(TestCase):
template = self.env.from_string(template_string)
self.assertEqual(tag_body, template.render())
- def test_empty_tag(self):
+ def _test_empty_tag(self):
template = self.env.from_string("""{% compress js %}{% block js %}
{% endblock %}{% endcompress %}""")
context = {'STATIC_URL': settings.COMPRESS_URL}
self.assertEqual('', template.render(context))
- def test_empty_tag_with_kind(self):
+ def _test_empty_tag_with_kind(self):
template = self.env.from_string("""{% compress js %}{% block js %}
{% endblock %}{% endcompress js %}""")
context = {'STATIC_URL': settings.COMPRESS_URL}
self.assertEqual('', template.render(context))
- def test_css_tag(self):
+ def _test_css_tag(self):
template = self.env.from_string("""{% compress css -%}
@@ -86,7 +86,7 @@ class TestJinja2CompressorExtension(TestCase):
out = css_tag("/static/CACHE/css/e41ba2cc6982.css")
self.assertEqual(out, template.render(context))
- def test_nonascii_css_tag(self):
+ def _test_nonascii_css_tag(self):
template = self.env.from_string("""{% compress css -%}
@@ -95,7 +95,7 @@ class TestJinja2CompressorExtension(TestCase):
out = css_tag("/static/CACHE/css/799f6defe43c.css")
self.assertEqual(out, template.render(context))
- def test_js_tag(self):
+ def _test_js_tag(self):
template = self.env.from_string("""{% compress js -%}
@@ -104,7 +104,7 @@ class TestJinja2CompressorExtension(TestCase):
out = ''
self.assertEqual(out, template.render(context))
- def test_nonascii_js_tag(self):
+ def _test_nonascii_js_tag(self):
template = self.env.from_string("""{% compress js -%}
@@ -113,7 +113,7 @@ class TestJinja2CompressorExtension(TestCase):
out = ''
self.assertEqual(out, template.render(context))
- def test_nonascii_latin1_js_tag(self):
+ def _test_nonascii_latin1_js_tag(self):
template = self.env.from_string("""{% compress js -%}
@@ -122,7 +122,7 @@ class TestJinja2CompressorExtension(TestCase):
out = ''
self.assertEqual(out, template.render(context))
- def test_css_inline(self):
+ def _test_css_inline(self):
template = self.env.from_string("""{% compress css, inline -%}
@@ -134,7 +134,7 @@ class TestJinja2CompressorExtension(TestCase):
])
self.assertEqual(out, template.render(context))
- def test_js_inline(self):
+ def _test_js_inline(self):
template = self.env.from_string("""{% compress js, inline -%}
@@ -143,7 +143,7 @@ class TestJinja2CompressorExtension(TestCase):
out = ''
self.assertEqual(out, template.render(context))
- def test_nonascii_inline_css(self):
+ def _test_nonascii_inline_css(self):
org_COMPRESS_ENABLED = settings.COMPRESS_ENABLED
settings.COMPRESS_ENABLED = False
template = self.env.from_string('{% compress css %}'
diff --git a/compressor/tests/test_storages.py b/compressor/tests/test_storages.py
index 91a36f2..986fef1 100644
--- a/compressor/tests/test_storages.py
+++ b/compressor/tests/test_storages.py
@@ -34,7 +34,7 @@ class StorageTestCase(TestCase):
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):
+ def _test_css_tag_with_storage(self):
template = """{% load compress %}{% compress css %}
diff --git a/compressor/tests/test_templatetags.py b/compressor/tests/test_templatetags.py
index db0d1b7..f2f1cc6 100644
--- a/compressor/tests/test_templatetags.py
+++ b/compressor/tests/test_templatetags.py
@@ -34,12 +34,12 @@ class TemplatetagTestCase(TestCase):
def tearDown(self):
settings.COMPRESS_ENABLED = self.old_enabled
- def test_empty_tag(self):
+ def _test_empty_tag(self):
template = """{% load compress %}{% compress js %}{% block js %}
{% endblock %}{% endcompress %}"""
self.assertEqual('', render(template, self.context))
- def test_css_tag(self):
+ def _test_css_tag(self):
template = """{% load compress %}{% compress css %}
@@ -48,7 +48,7 @@ class TemplatetagTestCase(TestCase):
out = css_tag("/static/CACHE/css/e41ba2cc6982.css")
self.assertEqual(out, render(template, self.context))
- def test_uppercase_rel(self):
+ def _test_uppercase_rel(self):
template = """{% load compress %}{% compress css %}
@@ -57,7 +57,7 @@ class TemplatetagTestCase(TestCase):
out = css_tag("/static/CACHE/css/e41ba2cc6982.css")
self.assertEqual(out, render(template, self.context))
- def test_nonascii_css_tag(self):
+ def _test_nonascii_css_tag(self):
template = """{% load compress %}{% compress css %}
@@ -66,7 +66,7 @@ class TemplatetagTestCase(TestCase):
out = css_tag("/static/CACHE/css/799f6defe43c.css")
self.assertEqual(out, render(template, self.context))
- def test_js_tag(self):
+ def _test_js_tag(self):
template = """{% load compress %}{% compress js %}
@@ -75,7 +75,7 @@ class TemplatetagTestCase(TestCase):
out = ''
self.assertEqual(out, render(template, self.context))
- def test_nonascii_js_tag(self):
+ def _test_nonascii_js_tag(self):
template = """{% load compress %}{% compress js %}
@@ -84,7 +84,7 @@ class TemplatetagTestCase(TestCase):
out = ''
self.assertEqual(out, render(template, self.context))
- def test_nonascii_latin1_js_tag(self):
+ def _test_nonascii_latin1_js_tag(self):
template = """{% load compress %}{% compress js %}
@@ -115,7 +115,7 @@ class TemplatetagTestCase(TestCase):
"""
self.assertEqual(out, render(template, context))
- def test_named_compress_tag(self):
+ def _test_named_compress_tag(self):
template = """{% load compress %}{% compress js inline foo %}
{% endcompress %}
@@ -150,14 +150,14 @@ class PrecompilerTemplatetagTestCase(TestCase):
settings.COMPRESS_ENABLED = self.old_enabled
settings.COMPRESS_PRECOMPILERS = self.old_precompilers
- def test_compress_coffeescript_tag(self):
+ def _test_compress_coffeescript_tag(self):
template = """{% load compress %}{% compress js %}
{% endcompress %}"""
out = script(src="/static/CACHE/js/e920d58f166d.js")
self.assertEqual(out, render(template, self.context))
- def test_compress_coffeescript_tag_and_javascript_tag(self):
+ def _test_compress_coffeescript_tag_and_javascript_tag(self):
template = """{% load compress %}{% compress js %}
@@ -176,7 +176,7 @@ class PrecompilerTemplatetagTestCase(TestCase):
self.assertEqual(out, render(template, self.context))
@override_settings(COMPRESS_ENABLED=False)
- def test_compress_coffeescript_tag_compress_enabled_is_false(self):
+ def _test_compress_coffeescript_tag_compress_enabled_is_false(self):
template = """{% load compress %}{% compress js %}
{% endcompress %}"""