Skip to content

Commit

Permalink
Update test_css_no_hash pursuant to changes in CssAbsolutizingTestCas…
Browse files Browse the repository at this point in the history
…e from 626bc52.
agriffis committed Jul 16, 2014
1 parent 626bc52 commit 4e13e9a
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions compressor/tests/test_filters.py
Original file line number Diff line number Diff line change
@@ -131,19 +131,17 @@ def tearDown(self):
def test_css_no_hash(self):
settings.COMPRESS_CSS_HASHING_METHOD = None
filename = os.path.join(settings.COMPRESS_ROOT, 'css/url/test.css')
params = {
content = self.template % blankdict(url='../../')
params = blankdict({
'url': settings.COMPRESS_URL,
}
output = ("p { background: url('%(url)simg/python.png') }"
"p { filter: Alpha(src='%(url)simg/python.png') }") % params
filter = CssAbsoluteFilter(self.content)
})
output = self.template % params
filter = CssAbsoluteFilter(content)
self.assertEqual(output, filter.input(filename=filename, basename='css/url/test.css'))

settings.COMPRESS_URL = params['url'] = 'http://static.example.com/'
filter = CssAbsoluteFilter(self.content)
filename = os.path.join(settings.COMPRESS_ROOT, 'css/url/test.css')
output = ("p { background: url('%(url)simg/python.png') }"
"p { filter: Alpha(src='%(url)simg/python.png') }") % params
output = self.template % params
filter = CssAbsoluteFilter(content)
self.assertEqual(output, filter.input(filename=filename, basename='css/url/test.css'))

def test_css_absolute_filter(self):

0 comments on commit 4e13e9a

Please sign in to comment.