def test_subprocess_compressor(self): compressor = SubProcessCompressor(False) test_file = open(os.path.join(settings.COMPRESS_ROOT, 'js/results1.js'), 'rb') data = test_file.read() test_file.close() out = compressor.execute_command("cat", data) self.assertEqual(out, data, 'Wrong command output expected "%s", got "%s"' % (data, out))
def test_subprocess_compressor(self): compressor = SubProcessCompressor(False) test_file = open( os.path.join(settings.COMPRESS_ROOT, 'js/results1.js'), 'rb') data = test_file.read() test_file.close() out = compressor.execute_command("cat", data) self.assertEqual( out, data, 'Wrong command output expected "%s", got "%s"' % (data, out))
def __init__(self, content_type, arguments, verbose): self.content_type = content_type self.arguments = arguments SubProcessCompressor.__init__(self, verbose)