Fixed tests added in the previous commit.
This commit is contained in:
@@ -42,6 +42,8 @@ def css_tag(href, **kwargs):
|
||||
return template % (href, rendered_attrs)
|
||||
|
||||
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
class CompressorTestCase(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
@@ -454,12 +456,13 @@ class OfflineGenerationTestCase(TestCase):
|
||||
self._old_compress_offline = settings.COMPRESS_OFFLINE
|
||||
settings.COMPRESS_ENABLED = True
|
||||
settings.COMPRESS_OFFLINE = True
|
||||
self.template_file = open("templates/test_compressor_offline.html")
|
||||
self.template_file = open(os.path.join(here, "templates/test_compressor_offline.html"))
|
||||
self.template = Template(self.template_file.read().decode(settings.FILE_CHARSET))
|
||||
|
||||
def tearDown(self):
|
||||
settings.COMPRESS_ENABLED = self._old_compress
|
||||
settings.COMPRESS_OFFLINE = self._old_compress_offline
|
||||
self.template_file.close()
|
||||
|
||||
def test_offline(self):
|
||||
count, result = CompressCommand().compress()
|
||||
|
Reference in New Issue
Block a user