def test_css_concatenate(self): settings.COMPRESS_CSS_COMPRESSORS = [] settings.COMPRESS_ROOT = os.path.join(os.path.dirname(__file__), "testdata/") compressor = CSSCompressor() output = compressor.compress(css_list) test_file = open( os.path.join(settings.COMPRESS_ROOT, 'css/results1.css'), 'rb') self.assertEqual(test_file.read().decode('utf8'), output) test_file.close()
def test_csstidy(self): tidy = glob.glob(settings.COMPRESS_CSSTIDY_BINARY) if tidy: settings.COMPRESS_CSS_COMPRESSORS = [ 'compress.compressors.csstidy.CSSTidyCompressor' ] compressor = CSSCompressor() output = compressor.compress(css_list) test_file = open( os.path.join(settings.COMPRESS_ROOT, 'css/results_tidy.css'), 'rb') self.assertEqual(test_file.read().decode('utf8'), output) test_file.close()